Hi Team,
I am writing shell scripts for both unix and linux .. but for unix server even though i am using bash shebang at the begining of the shell file.
still it's running the scripts in bourne shell .
can someone please suggest me on how to run the scripts in bash shell irrespective of the default shell present on the server .
Hello sravani25,
Without seeing samples of your code, without having complete exposure of what you are trying to do; its very difficult to advice on anything. So please do add more details in your question; if possible add sample codes too.
Thanks,
R. Singh
The #!/bin/bash
is supported on all Unix, if present.
Test it with /bin/bash --version
#!/bin/bash
should make the script interpreted by bash IF you call/execute the script by its name: myScriptName.sh
(unless you call/execute the script by something similar to: sh myScriptName.sh
)