I have applied the script and the suggestions are fantastic. For the kind of
work I am doing now, having the numbers helps me a lot, although I do also
understand the point Christ is making. Many thanks!
--
9fans: 9fans
Permalink:
https://9fans.topicbox.co
Many thanks. I will apply your solutions and revert back. It just seems a
little counter intuitive not to be able to show the line numbers as ed
does,especially if one is viewing a large body of text.
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/
In ed one can show line numbers using n. To delete line nubers is thus easy. In
sam - d it appears this is not possible. I understand sam is not a line editor.
What the would be the best way to delete a range of lines?
--
9fans: 9fans
Permalink:
https://9
Thank you! I was erring in that I failed to repeat x.
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T06c9db1e30f71346-Mdb19a92f81130bed1063af3c
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
I am running sam -d in a Debian Linux Subsystem on Windows. I am editing a
series of documents that require several changes per line(s).
I can for instance change:
I love working in sam in teh terminal
to
I love working in sam -d in the terminal
using:
.x/sam/c/sam -d/
.x/teh/c/the
Is it po
I have managed to set up pop in 9front but have had less success with smtp.
The error I get is below:
https://drive.google.com/file/d/137x3djRXv1EVnsk4_LSRtJrQ23K34kwj/view?usp=sharing
I have tried about a dozen things to fix it. Perhaps someone can guide me?
---
Thank you Silas. You have helped solve the problem. I was trying to access this
file after I had exited sam, rather than from within it.
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T0e2541a723ce90e5-Mcd8ff4eb0c8fc62cc701245f
Delivery
Having spoken of ,>spell I seem now to betting an unusual message. If I run
,>spell on my current file within sam, I get (sam: more in /tmp/sam.err) .
Anyone know what this means and how it can be corrected?
--
9fans: 9fans
Permalink:
https://9fans.topicbo
I am very grateful for these. Thanks for posting.
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T0e2541a723ce90e5-Md16e46b3e5f16e507a609910
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
No problem. Thanks. Yes, I use and love ,>spell. :)
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T0e2541a723ce90e5-Me2ac4c31218508cf798ebe8f
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
Is there a way to implement autoexpand and autocorrect in sam in any way, i.e.
for common spelling mistakes and commonly used phrases?
I don't need anything too sophisticated.
Thanks.
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T
It's a standard usb 2 Type-A
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/Tddd6ef89c1e17f3a-Mac87702070b83c5d4e08cd6c
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
Please note that I tried this first on VMWARE and then qemu with the same
problem in both.
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/Tddd6ef89c1e17f3a-Md28992087e0c2fd00d2112d6
Delivery options: https://9fans.topicbox.com/groups/9f
I have succeeded in installing plan9 on qemu but so far have not had any
success in getting via plan9 to the USB fat drive that contains my data. If I
go into /dev/ I cannot see the device listed there. Any ideas would be
appreciated.
--
9fans: 9fans
Perm
Thanks so much!
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T0d54d4b593281935-M872a6411e5772d69166bf414
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
Thanks for clarifying. Now why does sam not display utf-8 characters on my
setup?
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T0d54d4b593281935-M73d5efdb47296d7869a25279
Delivery options: https://9fans.topicbox.com/groups/9fans/subsc
I came to this impression after reading:
"Sam edits uninterpreted ASCII text."
http://doc.cat-v.org/plan_9/4th_edition/papers/sam/
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T0d54d4b593281935-Mf25e9d16a3b91bb3c67546e2
Delivery options
I was under the impression you could only use ASCII.
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T0d54d4b593281935-Med338a73860dc960cac21090
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
Thanks for this. I will definitely test it out.
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/Tb96dc1908d10a68c-M907dc300796b221b02688960
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
The last cheat sheet I posted was in need of revision and reordering. This one
is better than the last--I hope.
CHEAT SHEET OF SAM
COMMANDS
x cmd - set dot and
run command on each matching line
. -- apply command
to dot
, -- apply command
to whole document
< replace dot
with std inpu
Thank you so much for these answers. I greatly appreciate it.
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T8df760861ae2c8cd-M7b0cae6b9565025cd21584fa
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
I would like to be able to break up long lines in sam in a way similar to the
way I break them up in ed. For ed, I rely on the external command !fold -s -w80
%.
This did not work for me in sam. What would be the best way to achieve this in
sam? And is there a format line(s) command I could use?
On Friday, 6 August 2021, at 2:54 PM, Philip Silva wrote:
> Actually there is a separate fork of 9fans.net/go that also runs on Plan 9
> and uses the /dev/draw there! Here it's now all merged together:
> https://github.com/psilva261/go Philip
Thanks for the information.
--
On Friday, 6 August 2021, at 5:04 PM, ori wrote:
> It will not run in your setup. The version of sam you
decided to use does not support the operators in that
script.
Many thanks for your response. You have answered my questions.
--
9fans: 9fans
Permalink:
On Friday, 6 August 2021, at 2:22 AM, fwrm wrote:
> The command ,x/".+"/ would select every string that begins with a double
> quote, has one character or more after that, and ends with a double quote. If
> we wanted to select only the characters inside double quotes, we could reject
> the doubl
Thank you very much for your replies which are extremely helpful. I am going to
test these solutions and revert back.
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T3107cd3bc536dc63-Ma1895276c47f740f67f4c1e2
Delivery options: https://9
Below is my learners cheat sheet of sam commands which I am enclosing should
find it helpful. I welcome any suggestions and/or corrections. These have been
put together mostly from the standard resources, but there are gaps in my
knowledge.
$ - end of line/file
$-/vi/ -- search from end of the
I am running sam as a standalone on Debian 10:
https://9fans.github.io/plan9port/
I have found this version to be stable and would not like to change it.
I also like the visual display.
I start up sam from the terminal with a single option:
font=/mnt/font/GoMono/14/font sam
In this scenario, i.e.
On Tuesday, 3 August 2021, at 6:29 PM, fwrm wrote:
> As for comments in scripts, if you use ssam(1) to run them the easiest way
> would be starting the lines you want to be ignored with a character that
> isn't a sam command (this will work because ssam sends stderr to /dev/null).
I am very grate
On Monday, 2 August 2021, at 9:05 PM, Mark van Atten wrote:
> Look for the part about 'grouping'.
Okay. Got it. Thanks. This gives me what I need:
,x g//{
p
}
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T6d4564e82d943342-Mb69acabb528b
On Monday, 2 August 2021, at 7:48 PM, Mark van Atten wrote:
> man sam
I have read the man page several times. It speaks of display commands not of
their combinations.
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T6d4564e82d943342-Mcaf
On Monday, 2 August 2021, at 6:50 PM, Mark van Atten wrote:
> Combine the p with an =.
If I add = to ,x g//+-p as in ,x g//+-p= I get a ?newline
expected error.
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T6d4564e82d943342-Mc36c6bb21
On Monday, 2 August 2021, at 6:48 PM, Paul Lalonde wrote:
> I occasionally do (in acme, sam MMV)
> ,x/open/+-{
> p
> }
This works. Thanks.
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T6d4564e82d943342-M34b7a267df5b9586d22eff2e
Deliver
In sam if I invoke ,x g//+-p sam prints out the hits in the sam window
by lines. I was wondering if there is a way of going from any of those search
results directly to the line in the document where the string occurs?
--
9fans: 9fans
Permalink:
https:
On Tuesday, 27 July 2021, at 2:56 AM, Ethan Gardener wrote:
> For completeness, one specific case not mentioned is opening a huge file. For
> each file you open, Sam creates and initializes a temporary file several
> times larger. If you open a gigabyte-size file, the initialization takes a
> wh
In any event, is there not a way to run the script from within sam without
using that particular version?
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T10b1d559ae7d981e-M5ba554cb9f33ef440fb7c81e
Delivery options: https://9fans.topicbox
On Monday, 26 July 2021, at 11:07 PM, ori wrote:
> 9front's sam does not run on Debian linux.
I assumed the version of sam that I downloaded from here:
https://9fans.github.io/plan9port/ was 9front' sam.
--
9fans: 9fans
Permalink:
https://9fans.topicbox.co
On Wednesday, 21 July 2021, at 12:09 PM, umbraticus wrote:
> also worth mentioning the ^ command if you're using 9front's sam.
put your sam commands in script like this:
#!/bin/rc
cat << STOP
x/ +/c/
x/\*/d
STOP
I cannot get ^script to work from within sam. I do have 9front's sam installed
but
Oh, that's great! Missed that.
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T60b5c1929a63b077-M33b4088e798ae012e12808ef
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
Thanks to all!
* As far as sam windows being unresponsive, of the reasons suggested, it seems
that in my case I am not always entering commands on the last line. When this
happens, the sam window does not respond to commands and gets stuck and I am
only thereafter able to enter a command if I s
Thank you both for your responses. I am going to consider them more carefully
and revert back.
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T60b5c1929a63b077-M88470c3bf339d908722912b9
Delivery options: https://9fans.topicbox.com/group
That's awesome. Thanks so much Sigrid.
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T60b5c1929a63b077-M0d532c7bf38e59584f0e7d52
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
I have a few questions about sam which have not thus far been answered for me
as I am reading the documentation. I thought that instead of putting them in
separate posts, I could just put them into one. I hope this is acceptable.
Please let me know if is not.
* The sam window is not always r
Thank you so much Silas for your detailed and informative response. I have
settled on accepting your second solution x/$^/!# for the time being. It gives
me just the result I need. I use the commented lines mostly as a mnemonic
device to recall the meaning of complex commands.
-
*not ignored
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T10b1d559ae7d981e-Mb735bb03a18063dea7599571
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
I have tested all these solutions and they work. I can now apply the script
(now significantly improved) from within sam and also from the command line
with ssam. I will keep these posts as examples. The only question that remains
is how to add comments to this script. If I use # it is ignored.
Awesome. Thank you. I can hardly believe you have managed to reduce all those
commands to just a few. I will test this and revert back.
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T10b1d559ae7d981e-M093404c48ec88dcc971cf6aa
Delivery o
Thank you all for your responses. I will carefully study the suggestions
provided. sam is new to me and I am trying hard to learn it. There are obvious
errors in the script I provided and I apologise for those. I could as Rob
suggested simply apply the ed script, but I am trying to learn sam's
In ed I have a cleanup script which I can apply to several files at once. The
script removes things like blank lines and spaces between words. To run it on a
file or multiple files, I type this command:
ed [name of file(s)] < cleanup-script
I converted all the regular expressions in the file into
Thank you. Those distinctions are very helpful. I agree that thinking in terms
of lines is easier to reason about. I am going to have to change some of my
thinking and break old habits.
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/Te
Thank you for the clarification. This first usage conforms to ed. I am
currently working slowly through "A Tutorial for the Sam Command Language"
http://doc.cat-v.org/bell_labs/sam_lang_tutorial/ but I have yet gotten to this
usage of "g" after "s".
--
9fa
I.e. in sam. In ed, g is frequently used at the end of the line.
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/Te7fcdc06a68bb777-M976ef16f9b129d3abeaa2511
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
Thank you all for your responses. They were extremely helpful. The first
example, which uses "g" threw me a little because I am not used to "g" at the
end of the line. I presume it here means something like, "without changing the
value of dot?"
--
9fans: 9
Thank you. I will test this an revert back.
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/Te7fcdc06a68bb777-Mc5bcc7a82cda1c6c53ac3225
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
In ed it is trivial to edit either side of a line such as changing the line,
I use sam and ed
to,
echo "I use sam and ed."
simply with,
g/.*/s//echo "&."/
I am trying to figure out how to do the same in sam.
--
9fans: 9fans
Permalink:
https://9fans.
55 matches
Mail list logo