# delete the line 18 from ‘~/.ssh/known_hosts’ file
sed -i ’18 d’ ~/.ssh/known_hosts
# also
sed -i 18d ~/.ssh/known_hosts
# delete few lines
# delete 6 lines from line 8
sed -i 8,+6d file.txt
# delete the line where is ‘TO DELETE’
sed -i ‘/string to delete/ d’ file.txt
Źródło: http://snipplr.com/view/6152/
No Comments