[Gllug] Shell scripts

Jonathan Dye jonathan.dye at automationpartnership.com
Fri May 3 09:00:28 UTC 2002


Hi,

I have a script that removes a load of files from a directory tree and then
copies a load of files in to replace the removed ones (from several
sources).  What I want to do is provide some sort of progress information
and I thought I could do this by getting a list of the files that are going
to be deleted and then deleting them one at a time and calculating the
percentage of files deleted.
This seems like a horrible idea as it would be spawning lots of processes so
does anyone have any other suggestions?
Also, I'm using find to list the files but I can't get the splitting to work
correctly:

FILES=$(find <mypath> <criteria>)
echo ${FILES[0]}
echo ${FILES[1]}
echo ${#FILES[@]}

shows a list of all files in ${FILES[0]} and none in ${FILES[1]}, while
${FILES[@]} is 1

JD

_____________________________________________________________________
This message has been checked for all known viruses by the 
MessageLabs Virus Scanning Service

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list