delete specific line from a file in linux
1. n: the number of line
sed 'nd' filename
(just print)
sed -i 'nd' filename
(change file)
2. word: the word contained in line which I want to delete
sed '/word/d' filename
(just print)
sed -i '/word/d/ filename
(change file)
Thanks,
JF
sed 'nd' filename
(just print)
sed -i 'nd' filename
(change file)
2. word: the word contained in line which I want to delete
sed '/word/d' filename
(just print)
sed -i '/word/d/ filename
(change file)
Thanks,
JF
댓글
댓글 쓰기