Re: shell script problem
"Aaron S. Hawley" <[email protected]> Wed, 18 Feb 2004 14:52:17 -0500 (EST)
| Newsgroups | gmane.org.ballistichelmet.devel |
|---|---|
| Organization | University of Vermont |
| Message-ID | <[email protected]> |
works in bash, and in /bin/sh on zoo.
what shell are you in, or how are you running it?
On Wed, 18 Feb 2004, dvanhorn wrote:
> I've got a shell script like this:
>
> ------------------------------
> #!/bin/sh
>
> maybe_mkdir ()
> {
> if [ ! -e "${1}" ]; then
> echo "mkdir ${1}"
> mkdir "${1}"
> fi
> }
>
> maybe_mkdir tmp
> ------------------------------
>
> The last call results in "test: argument expected". Anyone see what I am
> doing wrong here? (This is from code I would expect to work.)
>
> David