Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SED]Substitute
06-15-2010, 02:23 PM
Post: #1
[SED]Substitute
In SED the substitute is represented by an s. It can be used to replace or substitute characters. Go to your terminal and type in

echo N

This will of course print N

Now for using Sed
Type in
Code:
echo programming | sed s/programming/pro9ramming/

See? Very simple. Now for a bit of explanation

echo sets the variable to out put and | gives it to sed to manipulate

you execute sed by(sed) then the argument for substitution 's' then the /<String to replace>/<What to replace it with/

Try toying around with this, it is very powerful.

"Character is determined more by the lack of certain experiences than by those one has had."
Friedrich Nietzsche
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


 Quick Theme: