Re: Awk help



On 27/09/2010 14:35, contracer wrote:

Hi,
Please help me how optimize this awk code:

/usr/openv/netbackup/bin/admincmd/bpmedialist -l | awk '/GF050/&& /
NULL/ { print $0 }' | awk 'substr($0, 52, 4) + 0> 1'> tapes.lis

Without having any sample input, my best guess is this:

awk '/GF050/ && /NULL/ && substr($0, 52, 4) + 0 > 1' > tapes.lis

Hermann
.