Re: Exit application with two function calls

2008-01-27 Thread abi
> [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 ()

Re: Exit application with two function calls

2008-01-27 Thread abi
> [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 application with two function calls

2008-01-27 Thread abi
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

Re: What am I missing?

2007-09-02 Thread 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 > >

What am I missing?

2007-09-02 Thread 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