Re: adding leading zeros to a filename
alan_at_ljubljana.agtrz.com
Date: 01/30/05
- Next message: Janis Papanagnou: "Re: adding leading zeros to a filename"
- Previous message: Alan Connor: "Re: select line from file, and then the next line a week later"
- In reply to: Kevin Rodgers: "Re: adding leading zeros to a filename"
- Next in thread: Janis Papanagnou: "Re: adding leading zeros to a filename"
- Reply: Janis Papanagnou: "Re: adding leading zeros to a filename"
- Reply: Chris F.A. Johnson: "Re: adding leading zeros to a filename"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 30 Jan 2005 13:37:57 -0600
On 2005-01-28, Kevin Rodgers <ihs_4664@yahoo.com> wrote:
> rupert wrote:
> > Basically I know nothing about shell scripting. I'm guessing I can
> > write such a beast that will list the contents of a directory
>
> for file in *.jpg; do
> ...
> done
>
> or
>
> ls *.jpg | while read file; do
> ...
> done
How do you handle the case where directory contains no *.jpg.
I get an error. Is there an idiom for the test?
-- Alan Gutierrez - alan@engrm.com
- Next message: Janis Papanagnou: "Re: adding leading zeros to a filename"
- Previous message: Alan Connor: "Re: select line from file, and then the next line a week later"
- In reply to: Kevin Rodgers: "Re: adding leading zeros to a filename"
- Next in thread: Janis Papanagnou: "Re: adding leading zeros to a filename"
- Reply: Janis Papanagnou: "Re: adding leading zeros to a filename"
- Reply: Chris F.A. Johnson: "Re: adding leading zeros to a filename"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|