unix/ssh question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alex79
    Confirmed User
    • Jun 2002
    • 996

    #1

    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
    Do Fun Shit.
    • Dec 2004
    • 13393

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

    I have the simplest tastes. I am always satisfied with the best.” -Oscar Wilde

    Comment

    • Gungadin
      Confirmed User
      • Aug 2005
      • 444

      #3
      You could also do something like:

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

      Your mileage may vary.
      The GFY popularity contest scoreboard

      Comment

      Working...