Re: adding leading zeros to a filename

alan_at_ljubljana.agtrz.com
Date: 01/30/05


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


Relevant Pages

  • Re: adding leading zeros to a filename
    ... > 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 ...
    (comp.unix.shell)
  • Re: PING : The space Boss
    ... He wasn't looking for attention on this issue in this NG. ... but I'm guessing he may be handicapped or disabled ... Retirement plan of the Beast ...
    (rec.music.artists.kiss)