[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exit application with two function calls

From: Linda Walsh
Subject: Re: Exit application with two function calls
Date: Mon, 28 Jan 2008 04:12:04 -0800
User-agent: Thunderbird (Windows/20071031)

Dang---you're right of course.  Didn't test the error case...too used to perl.

That's why I drag myself through shell scripts trying to do things I
might be tempted to do in perl...*sigh*

probably have to resort to a else block, running "Error", then
returning the status, i.e.:
        Error "invalid directory: "\$1\""
        return $?

Andreas Schwab wrote:
Linda Walsh <address@hidden> writes:

Check_file ()
    if [[ -d "$1" ]]; then echo "$1"                               # *4
    else return Error "invalid directory: \"$1\""; fi

"return" expects a number, not the string "Error" as the first argument
and does not take any further arguments.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]