GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   unix/ssh question (https://gfy.com/showthread.php?t=519529)

alex79 09-22-2005 01:31 PM

unix/ssh question
 
it is possible from command line to delete lines from a file?
for example delete all lines (like "wordxxx) from the files in the directory /var/
i want to delete only these lines from files.. not the entire files
if yes, how do i do that?

munki 09-22-2005 01:33 PM

http://www.chem.brown.edu/instructions/vi.html

Gungadin 09-22-2005 01:35 PM

You could also do something like:

cat yourfile.txt | grep -v "stuff you dont want" > newfile.txt

Your mileage may vary.


All times are GMT -7. The time now is 06:10 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123