sed
sed -n '5’p test.txt
sed -n '1,5’p test.txt
sed -n '1,
′
p
t
e
s
t
.
t
x
t
s
e
d
−
n
′
/
r
o
o
t
/
′
p
t
e
s
t
.
t
x
t
s
e
d
−
n
′
/
1
/
′
p
t
e
s
t
.
t
x
t
s
e
d
−
n
′
i
n
'p test.txt sed -n '/root/'p test.txt sed -n '/^1/'p test.txt sed -n 'in
′ptest.txtsed−n′/root/′ptest.txtsed−n′/1/′ptest.txtsed−n′in'p test.txt
sed -n '/r…o/'p test.txt
sed -n 'oo*'p test.txt
sed -e '1’p -e '/111/'p -n test.txt
sed '1’d test.txt
sed '1,3’d test.txt
sed '/oot/'d test.txt
sed ‘1,2s/ot/to/g’ test.txt
sed ‘s#ot#to#g’ test.txt
sed ‘s/[0-9]//g’ test.txt
sed ‘s/[a-zA-Z]//g’ test.txt
sed -r ‘s/(rot)(.)(bash)/\3\2\1/’ test.txt
sed 's/^.$/123&/’ test.txt
sed -i ‘s/ot/to/g’ test.txt