Home Reverse colors Help
Single page Previous Contents Next

Introduction to GNU/Linux
68 / 102

There's more than one way to do it

sed emulating UNIX commands
UNIX command sed equivalent
cat sed ':'
tac sed '1!G;h;$!d'
grep sed '/patt/!d'
grep -v sed '/patt/d'
head sed '10q'
tail sed -e ':a' -e '$q;N;11,$D;ba'
tail -f sed -u '/./!d'
cut -c 10 sed 's/\(.\)\{10\}.*/\1/'
cut -d: -f4 sed 's/\(\([^:]*\):\)\{4\}.*/\2/'
tr A-Z a-z sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'
wc -l sed -n '$='
uniq sed 'N;/^\(.*\)\n\1$/!P;D'
rev sed '/\n/!G;s/\(.\)\(.*\n\)/&\2\1/;//D;s/.//'
basename sed 's,.*/,,'
dirname sed 's,[^/]*$,,'
cp orig new sed 'w new' orig

Previous Contents Next