I would like to execute commands inside a shell script and store in a variable, but it is opening a new shell which I do not want. Is there any way to correct this? Here is my script.
#!/bin/bash V1=`<any_command>` #The shell should not open a new shell V2=`<another_command>` #The shell should not open a new shell
I can execute the shell script like below to execute on same shell:
But if there are commands inside shell script to be stored in variable and for that I use
Which still opens a new shell, which I do not want.