[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: shell program help wanted!



On Thu, 14 Sep 2000, nw x wrote:

> Hi, there:
> thanks in advances!
> 
> the code is:
> set i=0
> for file in `ls`

for file in *

> do
>      if [ -f $file ]; then

if [ -f $(basename $file) && $(basename $file) -ne "." ]; then

>        cp $file ./temp$i
>        if [ $? -ne 0 ]; then
>            echo "copy $file failed"
>        fi
>      fi
>      i = 'expr $i+1'
> done
> 

HTH,
L.G.

-- Generated Signature --
Hitchcock's Staple Principle:
	The stapler runs out of staples only 
while you are trying to
	staple something.
-- End Sig --





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]