[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
RE: shell program help wanted!
- From: "Peter Loo" <peter neoplanet com>
- To: <redhat-install-list redhat com>
- Subject: RE: shell program help wanted!
- Date: Thu, 14 Sep 2000 17:33:46 -0700
I would be very careful when using "ls". If you want all the files, I would
use this instead.
ls -1
-----Original Message-----
From: redhat-install-list-admin redhat com
[mailto:redhat-install-list-admin redhat com]On Behalf Of Luke C Gavel
(by way of Cosmio - Internet Gateway <staff intergate ca>)
Sent: Thursday, September 14, 2000 4:48 PM
To: redhat-install-list redhat com
Subject: 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 --
_______________________________________________
Redhat-install-list mailing list
Redhat-install-list redhat com
https://listman.redhat.com/mailman/listinfo/redhat-install-list
_______________________________________________
Redhat-install-list mailing list
Redhat-install-list redhat com
https://listman.redhat.com/mailman/listinfo/redhat-install-list
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]