how to remove a line from a text file
Hi Linux Guru's
I'm trying to find ways on how can I remove lines from a file using "SED" but still the lines do still exists. tried this command but didnt work = sed 'pogi' sudoers I'm trying to remove this two line from sudoers (I am root) # pogi is enabled halaka ALL=(ALL) NOPASSWD:/opt/hal/bin/test.sh please enlighten me on other options that can be used |
Guessing doesn't work well with command line. Try reading the man page or online tutorials before using a command.
|
Quote:
http://www.theunixschool.com/2012/06...e-line-or.html Please try to do basic research on your own, before posting, and try to apply what you've been told in previous threads. |
Use visudo, position cursor on first line to delete, type "dd" two times then ":wq", done
|
maybe grep would be better suited:
Code:
grep -v "(pogi is enabled|halaka ALL=\(ALL\) NOPASSWD:/opt/hal/bin/test.sh)" /whatever/floats/your/boat |
All times are GMT -5. The time now is 01:23 AM. |