awk and filenames with spaces.....
chrism at cjsoftuk.dyndns.org
Mon May 21 15:06:38 UTC 2007
Solved it with PHP in the end.
Simply just made a function that took the string, separator and where to
Why didn't I think of that first....?
David Koski wrote:
> I don't know about awk but this works although there is probably a better
> unzip -qql myzipfile.zip \
> | while read line; \
> do name=$(echo $line \
> | sed 's/^[^ ]*[ ]*[^ ]*[ ]*[^ ]*//'); \
> echo $name; done
> On Monday 21 May 2007 02:19, Chris Malton wrote:
>> I'm trying to use awk in combination with unzip -l to list all the
>> filenames in a zip archive. The problem comes when there's a apce in
>> the filename, as unzip uses spaces as separators. How can I get awk to
>> print from a particular index onwards? Something like printing all
>> fields higher than index 4, for example.
>> Any ideas how?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2146 bytes
Desc: S/MIME Cryptographic Signature
More information about the ubuntu-users