[PLUG] Parsing ls output

Sandy Herring sandy at herring.org
Mon Apr 1 23:17:04 UTC 2002


Michael,

Since the output columns are a fixed width, the simplest approach would be
to use `cut'.

Sandy

On Mon, 01 Apr 2002, Michael Montagne wrote: 
> Ok I've successfully manages to return t list of files on my FTP site
> that are older than 180 days and excluding a set of directories that are
> exempt from purging.  I used the find command and some worthy
> instruction from this list.  Now I'd like to print a report before I
> purge them all.  I need Filename, date modified, and size.  I don't want
> all the permissions and owner/group stuff you get with ls -al.  It seems
> awk is a good tool for the job except that some of these file names have
> spaces.  Lots of spaces.  Some are veritable essays.  I'm having trouble
> getting the filename parsed out using awk.  
> What are my other options?
> 
> -- 
> Michael Montagne
> montagne at boora.com
> http://www.boora.com

-- 
Sandy Herring, RHCE                        o              sandy at herring.org
Peck of Pickled Pisces               __  o               http://herring.org/
UNIX or Web authoring questions?  |\/ o\  o  http://herring.org/finger.html
=>http://herring.org/techie.html  |/\__/     http://herring.org/pub-key.asc
*sh, Perl, C, VBA, PICK Assembler, Data/Basic, PROC & profanity spoken here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://lists.pdxlinux.org/pipermail/plug/attachments/20020401/c21a60ef/attachment.asc>


More information about the PLUG mailing list