Difference between revisions of "Linux command: sed"
Jump to navigation
Jump to search
Rafahsolis (talk | contribs) (Created page with "The sed command can be used for varius things see man page:<br /> [http://unixhelp.ed.ac.uk/CGI/man-cgi?sed sed command man page] <br /> An example of use of sed to replace ch...") |
Rafahsolis (talk | contribs) m (Protected "Linux command: sed" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))) |
(No difference)
| |
Revision as of 04:17, 7 April 2015
The sed command can be used for varius things see man page:
sed command man page
An example of use of sed to replace characters:
echo <string to replace> | sed <regular expression>
Regular expresion:
s -> replace.
g -> all the 'e' are replaced with 'R'. without g only one 'e' is replaced.
# -> delimitation character can be: {|, /, #}.
Example:
echo "esto es un ejemplo" | sed 's#e#R#g'