Re: How to suppress warning messages for empty lines in shell scripts?



Jochen Berninger wrote:

From the command line I called (with nohup) a shell script which contains empty lines
(for better readability).

The nohup executes the script successfully but outputs a warning for the empty line:

/usr/local/joch/bin/dotest: line 3: : command not found

How can I suppress this warning (of cause without removing the empty line)?

Do I really have to always avoid empty lines in shell scripts?

The problem isn't an empty line. It's something else. You'll have to post the script for us to see what.

--
Erik Max Francis && max@xxxxxxxxxxx && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
In the fight between you and the world, back the world.
-- Frank Zappa
.



Relevant Pages

  • Re: Why doesnt foreach return a value
    ... say that Tcl evaluation does not return to the script if an ... They return an EMPTY value. ... of the command) as the name of a command, that we happen to have just ... It invokes the expression evaluator to handle the ...
    (comp.lang.tcl)
  • Re: How to suppress warning messages for empty lines in shell scripts?
    ... The nohup executes the script successfully but outputs a warning for the empty line: ... How can I suppress this warning (of cause without removing the empty line)? ... $ cat -A yourScript ...
    (comp.os.linux.misc)
  • Re: [PHP] Re: A general UL script
    ... I'm trying to validate wether or not to run the image check script. ... Posible to not add an empty field in the submit. ...
    (php.general)
  • Re: whats wrong with find -exec sed?
    ... but did the job faster than writing a script. ... But my first command still doesn't do what it is supposed to. ... files get completly empty now. ... Shouldn't there just be a switch in sed which does the trick? ...
    (alt.os.linux)
  • Re: Replace all script step - flakey?
    ... single step script with a replace statement which acts on the commish field. ... If you want records where BOTH Comm_Flag is empty AND GrandTotal is ...
    (comp.databases.filemaker)