Post Content

See Also Awk Command and Grep Command

One Liners[-][--][++]

  1. Replace all occurrence's in a file (and write back to the same file)
    1. sed -i "s/this/withthis/g" /tmp/somefile
  2. Replace output newline (carriage return) with <br />
    1. sed ':a;N;$!ba;s/\n/ /g'
    2. emailbody="<h2>Your Directory</h2><pre>`/bin/ls -Rhal $yourdir|sed ':a;N;$!ba;s/\n/<br\/>/g'`</pre>"