WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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


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

This is my cheat guide as i not experienced with sed

to remember what the letters s g etc stand for

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1651
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.
Download a copy and keep it handy: Core book ;)

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 2639
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 »