> Is there a way to get wild character support in the file-exist test =
> expression, I was able to do this in SCO's sh shell, but bash on linux  =
> doesnt seem to support it.
> For example:
> if [ -f mystuff*.zip ]
> then
> echo "mystuff files exist"
> fi
> Paul Meyers
> Systems Administrator
> Community Computer Service
> 15 Hulbert St.=20
> Auburn, NY 13021
> Ph (315) 255-0900 Fx (315) 255-0416

I suggest using the portable syntax of a for loop.

  for i in mystuff*.zip; do
    if [ -f "$i" ]; then
      echo "mystuff files exist"
    fi
  done

Or if want more terse copy:

  for i in mystuff*.zip; do
    test -f "$i" && echo "mystuff files exist"
  done

Bob


_______________________________________________
Bug-sh-utils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-sh-utils

Reply via email to