
no vim, com
vim file +10
Posso abrir o arquivo na linha 10, com
vim file +10d
Posso deletar a linha 10, mas como posso deletar a linha e sair do vim? ou como posso deletar a linha sem abrir o vim?
Responder1
vim file +10d -c wq
ou
vim file +10d -c x
vim --ajuda
-c <command> Execute <command> after loading the first file
Responder2
Para fazer isso seria melhor usarsedassim:
sed -i 10d file