awk - choose the newest file and use getline to read it -
There is a problem with a small awk script, I'm trying to select some log files for the latest and then Use the getline to read it. The problem is that if I do not send it to any script in the script it is okay.
This works
echo | Myprog.awk
this is not
myprog.awk
myprog.awk
BEGIN {# Find the latest file command = "ls -alrt | tail-1 | cut-in 59-100" order | Getline logfile close (command)} while {(getline> > 0) {#do magic print $ 0}}
Comments
Post a Comment