Re: shell scripting while if string length != 0

2003-08-01 Thread Rob
I'm not a shell guru, but pipelines don't necessarily run in sequence. In line 5 of your script, the part that says sed '1d' /path/to/file_o_commands will destroy all contents of the original file. This may or may not happen before cat /path/to/file_o_commands has finished reading it. If

RE: shell scripting while if string length != 0

2003-08-01 Thread Dave [Hawk-Systems]
I'm not a shell guru, but pipelines don't necessarily run in sequence. In line 5 of your script, the part that says sed '1d' /path/to/file_o_commands will destroy all contents of the original file. This may or may not happen before cat /path/to/file_o_commands has finished reading it.

RE: shell scripting while if string length != 0

2003-08-01 Thread Steve Coile
Dave: From your description of the script, and from the script itself, it appears that the reason you're checking for a blank command is to determine when you've reached the end of commands. Presumably, that would only occur at the end of the file. Is my interpretation correct? If the reason