in reply to untarring number of files

The string that you supply to system as an parameter is in single quotes. That means no interpolation of variables is done, hence you're always trying to untar the file with name '$file', regardless of the value that variable holds in the foreach.

Using double quotes might solve your problem if nothing else goes wrong along the way. You might want to look at the other answers to your question for better approaches.

Hope this helps, -gjb-

Replies are listed 'Best First'.
Re: Re: untarring number of files
by agent (Acolyte) on Oct 22, 2003 at 17:14 UTC
    thanks gjb ..converting to double quotes worked .. Appreciate all the other replies too.!!