How to suppress warning messages for empty lines in shell scripts?
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?
Jochen
Re: How to suppress warning messages for empty lines in shell scripts?
On 31 May 2008 17:17:36 GMT, Jochen Berninger <buzzuz@hotmail.com> 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?
|
| Jochen
nohup doesn't actually execute the script, it just sets some OS data up,
and passes things on to the normal shell.
Blank lines in a script should be fine.
Exactly how are you doing the nohup command line, and what do the first
few lines of the script look like?
--
Reverend Paul Colquhoun, ULC. [url]http://andor.dropbear.id.au/~paulcol[/url]
Asking for technical help in newsgroups? Read this first:
[url]http://catb.org/~esr/faqs/smart-questions.html#intro[/url]