views:

38

answers:

1

I have this piece of sh code here which takes one argument at a time:

#!/bin/sh

clear

if [ $# -eq 0 ]

        then
             echo -n "There are arguments...Please enter again with the arguments"
             echo
             exit

    elif [ ! -f "$*" ]
        then
            echo -n "The image file '$*' doesn't exist!"
            echo
            exit
    else
        display -size 40x50 $*
fi

How would i be able to make it print out up to 5 arguments therefore show 5 thumbnails at the same time?

Please help Thanks

A: 
Gadolin
Thanks so much! ;)
GuzzyD
Having a semicolon after the ampersand will produce an error.
Dennis Williamson
yeah i know i found out the error...just remove the semicolon and it would work...
GuzzyD
you should use `"$@"` instead of `$*`
dogbane