Tag: sed
Get External IP
December 30, 2007
Get the external IP of your system – useful if you have a dynamic ip… curl -s checkip.dyndns.org|sed -e ‘s/.*Current…
Double Space a File using Sed
December 26, 2007
Add a \n after every line in a file using the sed command… sed G
Pid Command
December 14, 2007
Create a command that will return the pid of the given command string.. #!/bin/sh ps aux|grep 1|head -n1|awk ‘{print2}’
Simple Sed Command
November 25, 2007
Change all occurrences of ‘one’ to ‘two’ in the file.txt file in the grep example, enter this: sed ‘s/one/two/g’ file.txt
Fetch columns of Output using Awk
July 9, 2007
One can use awk to get a specific column from a command output… First column of the command date|awk ‘{print…
Recent Comments