script formatting question?

Darin Perusich Darin.Perusich at cognigencorp.com
Mon Apr 22 11:04:44 EDT 2002


hello,

i'm beating myself up trying to figure this out and i need some outside 
input.

i'm trying to do a recursive search of a filesystem for all documents 
with a certain extension, *.doc, *.xls ./etc. when i get this list i 
need the following inforamtion about those files:

	name 	size(in bytes) 	/path/to/file
	---- 	-------------  	-------------
	darin	64000		 myresume.doc

i accomplish by:

find /home/darin -name "*.doc" -exec ls -l {} \;  \
|awk '{print $3 FS $4 FS $8}'

the problem i'm running into is files with spaces in the name, i.e my 
resume 2000.doc. since awk uses space and tab as the field seperator you 
don't get the full path of the file just up to the space.

i'm sure that there's an easy way to accomplish this in perl, but since 
i don't know much, next to nothing about perl i'm stuck.

any ideas?

for those that are interested i'm writing a script that bulk loads 
binary files into a mysql driven document management systems, sdms 
(simple document mangement system).

-- 
Darin Perusich
Unix Systems Administrator
Cognigen Corp.
darinper at cognigencorp.com



More information about the nflug mailing list