Sed - Как удалить строку по номеру в файле

Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2023
Перейти к:навигация, поиск
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Sed - Как удалить строку по номеру в файле (delete a particular line by line number in file)

для примера удалить 89 строку в файле /root/.ssh/known_hosts:

# sed -i 89d /root/.ssh/known_hosts