[Gllug] Awk and filenames with spaces in them

Martyn Drake martyn at drake.org.uk
Mon Sep 24 14:22:00 UTC 2007


I'm in the process of trying to figure out getting awk to deal with
spaces in filenames.  For example, if I have a line which contains a
filename that contains a space, AND awk is set-up to recognise spaces
as a delimiter (which is the case), if I just tell awk to print $4,
it'll print the first word only.  This can bugger up any other fields
which may be left after the filename.

Is there an easy way to approach filenames with spaces whilst using awk?

Bear in mind I am about as good at regular expressions as a fish is
tap dancing on the moon.

Regards,

Martyn
-- 
Email  : martyn at drake.org.uk
Phone  : +44 (0)7866 450 752
Skype  : mbdrake / +44 (0)20 7193 4618
Blog   : http://www.drake.org.uk
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list