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?

You don't have to avoid blank lines.
Are you sure they're really blank?
Try "cat -A /usr/local/joch/bin/dotest" to see if you've got some unprintable characters in your lines.
.



Relevant Pages

  • Re: perl warnings
    ... The first time it runs, parameter 'action' isn't defined so that is ... print "\$action is empty"; ... Use of uninitialized value in string eq at -e line 7. ... )' but that still produces a warning. ...
    (perl.beginners)
  • Use of uninitialized value in print
    ... print "Now will format .xls file\n"; ... #Holding Variables for mailing list ... After this I get warning talking about use of uninitialized value and ... but print statement is empty ...
    (comp.lang.perl.misc)
  • Re: Want to solve: Warning: Creating a pane with no CDocument
    ... Don't start with "empty project"! ... create a new MFC SDI project with the "Windows Explorer" ... style (in this case you will get splitter views from Microsoft, ... Warning: ...
    (microsoft.public.vc.mfc)
  • Print Spooler will not Start
    ... After taking one day off I came back to printing problems. ... My Printers list is now empty. ... Warning - SceCli, ...
    (microsoft.public.win2000.printing)
  • Re: Apple Mail delete confirmation
    ... >> any way of doing away with this warning. ... It is only a minor irritation, ... Same for me and I have it set to empty the trash after seven days. ...
    (comp.sys.mac.system)