Hi,
I guessing that the file2="/var${file:32}" part isn't working as expected. As chrism01 mentioned you can use the basename command or, staying with your idea: Code:
#!/bin/bash Hope this helps. |
Discovered the difference in using
Code:
#!/bin/sh Code:
#!/bin/bash Quote:
|
That could do it; each shell is slightly different, which is why (at least for prod scripts) I always(!) specify the shell I want explicitly.
Its also not unknown for 'sh' to in fact be a symlink to a different shell .... |
All times are GMT -5. The time now is 01:50 PM. |