> [EMAIL PROTECTED] schrieb:
>> Hi,
>>
>> I am working on a script and ran into an unusual program. Consider the
>> following script which I called how.sh.
>>
>> =
>>
>> #!/bin/bash
>>
>> error () {
>>
>>echo -e "\n\terror: ${*}\n"
>>exit;
>>
>># kill $$
>>
>> }
>>
>> check_file ()
> [EMAIL PROTECTED] writes:
>
>> =
>>
>> #!/bin/bash
>>
>> error () {
>>
>>echo -e "\n\terror: ${*}\n"
>>exit;
>
> Replace that with "exit 1". You can use any other non-zero exit code.
>
>># kill $$
>>
>> }
>>
>> check_file () {
>>
>>input="$*"
>>
>>if [ -e $input ]; then
>
exit
the script. One alternative is to use the kill statement, however this
route does not print the error message and prints the "termination"
message.
How can the problem I'm having exiting the application be solved? I'd like
to resulting code to be as clean as possible, and make all error messages
go through the error() function.
Thanks in advance.
Abi
; -prune -o'
>
> Then if you copy the command that was echoed and run it (find
> /cygdrive/c/Documents\ and\ Settings/arroyoa/Desktop -wholename
> '/cygdrive/c/Documents and Settings/arroyoa/Desktop/asdf' -prune -o
> -print) then you no longer receive the error. What am I missing from the
> script so that I can exclude these directories?
>
> Thanks,
> Abi
>
>
n if you copy the command that was echoed and run it (find
/cygdrive/c/Documents\ and\ Settings/arroyoa/Desktop -wholename
'/cygdrive/c/Documents and Settings/arroyoa/Desktop/asdf' -prune -o
-print) then you no longer receive the error. What am I missing from the
script so that I can exclude these directories?
Thanks,
Abi