[Gllug] Awk and filenames with spaces in them

Wulf Forrester-Barker basswulf at googlemail.com
Tue Sep 25 12:10:08 UTC 2007


Thinking around the problem, is it possible to either prevent names
with spaces being used or to force the log file to use a different
delimiter? Either of those would then make parsing the logs simpler.

Alternatively, you could either check the number of fields in a given
line and ignore / report on those that don't give the number you
expect. Stepping beyond that, there may be other ways you can describe
the field you want to extract and measure, such as "the third before
the end" ($NF - 3? I'd have to check to be sure) instead as the more
obvious "X from the beginning" ($X).

Wulf

-- 
Wulf Forrester-Barker
http://www.web-den.org.uk/home/
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list