bash scripting problem with nested if statements in while loop error
ok so im getting a syntax error on line 74 the 2nd to last fi the code is as follows
Code:
#!/bin/sh |
First, I would change /bin/sh to /bin/bash. This way you should be sure that everything will work as expected incase this script it run on a diffrent system that has /bin/sh linked to another shell, or actually contains the old Bourne Shell.
Secondly, you're missing a then after line 57 |
Quote:
I think it is correct to use /bin/sh instead of /bin/bash as TODAY it is more likely that bash may not be installed and instead /bin/sh is linked to say ksh or other bash-compatible. So it's better to use /bin/sh IMO. |
Quote:
|
Do you know of any distro today that still uses the old Bourne shell ? I don't. But I know some distros where bash is not necessary and is replaced by ksh, but the symlink from /bin/sh is still there.
|
All times are GMT -5. The time now is 11:40 PM. |