WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: sed examples a link  (Read 2324 times)

aus9

  • Guest
sed examples a link
« on: September 09, 2016, 05:34:14 PM »

This is my cheat guide as i not experienced with sed
http://www.theunixschool.com/2014/08/sed-examples-remove-delete-chars-from-line-file.html

to remember what the letters s g etc stand for
http://www.grymoire.com/Unix/Sed.html


Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: sed examples a link
« Reply #1 on: September 10, 2016, 02:15:30 AM »
Pretty much the same but maybe some more involved examples.
http://www.unixguide.net/unix/sedoneliner.shtml
Download a copy and keep it handy: Core book ;)

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: sed examples a link
« Reply #2 on: September 10, 2016, 11:43:22 AM »
I don't doubt there are times when the snail pace SED can resolve some complicated string manipulation easily, however for almost all cases I have found with a little creativity it's more efficient by far to use "Parameter substitution and expansion" already built-in to the shell itself, which is incredibly fast..    I'd recommend mastering this before delving into Sed.    Beside, Sed is too slow and consumes a huge amount of resources unnecessarily just to resolve one simple string manipulation.

Check out "Parameter Substitution" under "Advanced Bash-Scripting Guide" 

I think Sed is better suited for text manipulation within a document/text file
« Last Edit: September 10, 2016, 11:48:09 AM by coreplayer2 »