[9fans] Deleting lines in sam - d

2022-05-11 Thread revcomninos
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

Re: [9fans] Deleting lines in sam - d

2022-05-11 Thread umbraticus
= prints line number 3,7d deletes some lines Setting and working with the mark may also suit your problem find a place, press k, find another place, then ',.d or .,' deletes everything in between. Multiple marks à la ed would be a nice addition to sam. umbraticus P.S. Here's a patch to make = mo

Re: [9fans] Deleting lines in sam - d

2022-05-11 Thread revcomninos
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/

Re: [9fans] Deleting lines in sam - d

2022-05-11 Thread Chris Fröschl
revcomni...@gmail.com wrote: > 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.  You can also try: unix: ,>nl plan9: ,x {

Re: [9fans] Deleting lines in sam - d

2022-05-11 Thread umbraticus
I mean, if you really want it, you can ,|awk '{print NR "\t" $0}' then ,x/^[0-9]+ /d or something. umbraticus -- 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Tc5c492077a61275c-Mf73fea5ddae7354548491a99 Delivery options: https://

Re: [9fans] Deleting lines in sam - d

2022-05-12 Thread revcomninos
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