Home
Browse
Net
Simple
Sign In
Browse Topics
BSD (4)
DATABASE (11)
DEVELOPMENT (40)
LINUX (54)
NETWORQMEDIA (11)
OTHER (1)
PERSONAL (5)
WINDOWS (37)
Topic Contributors
mreschke
Matthew Reschke
Site Developer
Created: Dec 6th, 2010
Updated: Sep 6th, 2011
Topic Organization
LINUX (54)
scripts (19)
shell (17)
snippets (20)
Related Topics
Awk Command
Daemons and Runlevels
Linux Find Command
Linux SendEmail
Xsel command line clipboard
Favorite Linux Commands
ISO Images in Linux
Iptables Firewall
Debian Apt-Get
Set Date Time in Linux
ArchLinux Pacman Package Manager
Public Curl Installers
Public Shell Profile
Python Tutorial
Manage Linux Users and Groups
Linux Paths
Linux Screen Command
Respin Your Own Linux Distro
qLinux ArchLinux
VIM
File
Download Selected (zip)
Download Selected (tar.gz)
Edit
Select All
Select None
View
Detail
Detail Preview
Icons
Preview
Show Hidden
Hide Hidden
Full Manager
Reset Defaults
Open In New Tab
Open In New Window
List Archive Contents
Download File
Open
Download Folder (as .zip)
Sed Command
Comments (0)
Samba in Ubuntu
FreeNX Remote D..
Windows Remote ..
Linux Training ..
qLinux ArchLinu..
Sed Command
Topic
#226
by mreschke on 2010-12-06 17:40:02 (viewed 770 times)
Table of Contents
One Liners
See Also
Awk Command
and
Grep Command
One Liners
[-]
[- -]
[++]
Replace all occurrence's in a file (and write back to the same file)
sed -i "s/this/withthis/g" /tmp/somefile
Replace output newline (carriage return) with
<br />
sed ':a;N;$!ba;s/\n/ /g'
emailbody="<h2>Your Directory</h2><pre>`/bin/ls -Rhal $yourdir|sed ':a;N;$!ba;s/\n/<br\/>/g'`</pre>"
networqmedia presents mReschke.com powered by the all new mrcore4