Hi All, PHV
How can I print the getline statement from the following:
awk -v opt=Restore_Chris -v PH='/raw_data/SB/repdir/Archive_Restore/'
'BEGIN{print "connect tcenh198 dsadmin \"\""}
/MTA0000001/{print "compRead "substr($1,0,length($1)-10),"META_DOCUMENT ",PH$2}
END {print "end"
system("/sbin/rm " opt)
cmd="/ixos/sw/econ/bin/dsclient ""<"" Restore_Chris_1 "
while(((cmd) | getline CMD) >0)
{
print CMD
}
close(cmd)
}
' Restore_Chris > Restore_Chris_1
Many Thanks
Chris
How can I print the getline statement from the following:
awk -v opt=Restore_Chris -v PH='/raw_data/SB/repdir/Archive_Restore/'
'BEGIN{print "connect tcenh198 dsadmin \"\""}
/MTA0000001/{print "compRead "substr($1,0,length($1)-10),"META_DOCUMENT ",PH$2}
END {print "end"
system("/sbin/rm " opt)
cmd="/ixos/sw/econ/bin/dsclient ""<"" Restore_Chris_1 "
while(((cmd) | getline CMD) >0)
{
print CMD
}
close(cmd)
}
' Restore_Chris > Restore_Chris_1
Many Thanks
Chris