I am trying to write a script that sets my main terminal to use bash shell. I know the #!/bin/bash will call all the commands in the script to be run with the bash shell but what I want is a script that specifically that changes the shell of my terminal to bash.
for example: (this is how my terminal looks like when it is opened.)
when i want to set the terminal to bash I manually type the bash command and press enter.
The problem is if I write a script using the above command it works but any command after the bash command in the script fails to execute. for example
#!/bin/bash bash echo "setting terminal environment to bash" echo "success"
Expected output: (something like this)
[tyg@rooto ~]$ setting terminal environment to bash [tyg@rooto ~]$ success
or (Like this)
[tyg@rooto ~]$ [tyg@rooto ~]$ setting environment [tyg@rooto ~]$ success
any of the above is what I assume should be expected. Why are the two echo commands in the script failing to execute and is there a fix to this. Thanks