The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #12 (permalink)  
Old 05-15-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,094
That command should remove any line which contains an equals sign, or an opening parenthesis; the dash you put between also causes it to remove all lines which contain a character whose ASCII code falls between those two, in theory; however, ( comes before = in ASCII so I guess it doesn't really change anything (but could also be the reason you're not getting it to work). Take out the dash and try again? Or move it first or last in the class, like

Code:
grep -v '[-=(]' file

Last edited by era; 05-15-2008 at 11:48 PM. Reason: Or move to beginning or end of class
Reply With Quote