Thanks Phil,

did this:

egrep -v '^ATOM|HETATM.*H$' m.pdb > m_noH.pdb

Result:

in input file (m.pdb) I have:

ATOM      1  N   GLY A   1       0.504  -0.494   0.924  1.00  7.85          
ATOM      2  CA  GLY A   1       1.272   0.589   0.277  1.00  6.79          
ATOM      3  C   GLY A   1       1.700   1.614   1.301  1.00  5.59          
ATOM      4  O   GLY A   1       1.434   1.460   2.496  1.00  6.04          
ATOM      0  H1  GLY A   1       0.452  -1.280   0.308  1.00  7.85          
ATOM      0  H2  GLY A   1       0.959  -0.765   1.772  1.00  7.85          
ATOM      0  H3  GLY A   1      -0.420  -0.171   1.131  1.00  7.85          
ATOM      0  HA2 GLY A   1       2.157   0.171  -0.225  1.00  6.79          
ATOM      0  HA3 GLY A   1       0.659   1.070  -0.499  1.00  6.79          
END

Output file (m_noH.pdb) contains only:

END

Pavel

On 2/6/14, 12:03 PM, Phil Jeffrey wrote:
Of course, because in the shells that I use it will attempt to do variable name substitution in strings that are double-quoted.  (I make no warranties about all possible shells).  However if you use single quotes:

egrep  -v '^ATOM|HETATM.*H$' your.pdb > your_noH.pdb

Should work just fine in tcsh, csh at the very least.

Phil

On 2/6/14 2:52 PM, Pavel Afonine wrote:
Hi Tim,

On 2/6/14, 10:52 AM, Tim Gruene wrote:
the simple and qucik command

egrep  -v "^ATOM|HETATM.*H$" your.pdb > your_noH.pdb

should also work.

just out of curiosity I did (copy-paste of your example)

egrep -v "^ATOM|HETATM.*H$\" m.pdb > m_noH.pdb

and I got:

Illegal variable name.

Pavel

_______________________________________________
phenixbb mailing list
[email protected]
http://phenix-online.org/mailman/listinfo/phenixbb

_______________________________________________
phenixbb mailing list
[email protected]
http://phenix-online.org/mailman/listinfo/phenixbb