Comments on: sed – the missing manual http://www.alexonlinux.com/sed-the-missing-manual Tue, 16 May 2023 15:06:12 +0000 hourly 1 https://wordpress.org/?v=4.9.23 By: Alexander Sandler http://www.alexonlinux.com/sed-the-missing-manual/comment-page-1#comment-30190 Sun, 09 Dec 2012 19:07:55 +0000 http://www.alexandersandler.net/?page_id=132#comment-30190 My pleasure. Please come again :-)

]]>
By: Dallas http://www.alexonlinux.com/sed-the-missing-manual/comment-page-1#comment-30180 Wed, 05 Dec 2012 23:10:48 +0000 http://www.alexandersandler.net/?page_id=132#comment-30180 This article was fantastic. Thank you, Alex. I finally understand how to use sed!

]]>
By: Log http://www.alexonlinux.com/sed-the-missing-manual/comment-page-1#comment-29966 Fri, 19 Oct 2012 13:01:37 +0000 http://www.alexandersandler.net/?page_id=132#comment-29966 […] sed – the Missing Manual […]

]]>
By: dj http://www.alexonlinux.com/sed-the-missing-manual/comment-page-1#comment-24565 Tue, 07 Dec 2010 05:56:46 +0000 http://www.alexandersandler.net/?page_id=132#comment-24565 Someone already mentioned this, but the `cat file |` is superfluous.

See:
–UNIX tips: Learn 10 good UNIX usage habits
–http://www.ibm.com/developerworks/aix/library/au-badunixhabits.html
–#10. Stop piping cats

There’s an awesome sed cheat-sheet here:
–http://www.catonmat.net/blog/sed-stream-editor-cheat-sheet

While there, checkout the sed one-liners explained (1-3 parts):
–Famous Sed One-Liners Explained, Part I
–http://www.catonmat.net/blog/sed-one-liners-explained-part-one

]]>
By: Jean http://www.alexonlinux.com/sed-the-missing-manual/comment-page-1#comment-23994 Wed, 07 Jul 2010 15:18:54 +0000 http://www.alexandersandler.net/?page_id=132#comment-23994 @Alexander Sandler – One more fix – since your fix, it prints 22 twice – because of the /g.

Thanks for this useful tutorial.

]]>
By: Alexander Sandler http://www.alexonlinux.com/sed-the-missing-manual/comment-page-1#comment-22529 Fri, 22 May 2009 17:17:56 +0000 http://www.alexandersandler.net/?page_id=132#comment-22529 @Priyank
You are right. This will print 21 to 29. My apologies. I’ll fix it.

]]>
By: Priyank http://www.alexonlinux.com/sed-the-missing-manual/comment-page-1#comment-22526 Thu, 21 May 2009 12:26:03 +0000 http://www.alexandersandler.net/?page_id=132#comment-22526 Not sure how this will print 20 to 29
cat file | sed ‘/.0/ d; 1,10 d; s/1/2/’
as mentioned at the end of the article (“that does however exactly the same – prints numbers 20 through 29”). I am getting results 21 to 29.
I guess the first sed command will delete 10,20.

]]>
By: Alexander Sandler http://www.alexonlinux.com/sed-the-missing-manual/comment-page-1#comment-19857 Sat, 07 Mar 2009 17:13:29 +0000 http://www.alexandersandler.net/?page_id=132#comment-19857 @Kashif
Of course you can do that. Just make sure to use proper escape sequence(/) for ‘/’ character. Like this:

$ echo 'http://localhost:port/' | sed 's/http://localhost:port//aaa/'
aaa
$ 
]]>
By: Kashif http://www.alexonlinux.com/sed-the-missing-manual/comment-page-1#comment-19798 Fri, 06 Mar 2009 06:05:24 +0000 http://www.alexandersandler.net/?page_id=132#comment-19798 hi,

can you please let me know how can i modify a regular expression that already contains “/”. like i want to change

http://localhost:port/DevDB with http://productionhost:port/ProdDB

Thanks in advance.
Kashif

]]>
By: Alexander Sandler http://www.alexonlinux.com/sed-the-missing-manual/comment-page-1#comment-15958 Thu, 11 Dec 2008 07:11:58 +0000 http://www.alexandersandler.net/?page_id=132#comment-15958 This is exactly the same as with everything else in the world. Prettier always preferred over functional. Yet when you strip off all buzzes and whistles, you need tools to do the real job. And you’re right. For the last 30-40 years these have always been same tools :-) Thanks a lot for a warm comment and please visit my web-site again! :-)

]]>