Hi all,
I have been programming bash for a while. I'm not a complete expert but I can make my scripts work. However now that I have Linux 7.2 I'm running into problems. Here is mij problem.
I am writing a script with the following block:
Code:
su - oracle << EOF
examplevar="$(set | grep 'PATH=')
echo "${examplevar}"
EOF
So within the block I set some variables, however when I want to echo those variables, the are presented as empty. I never had this problem using Oracle Linux 5.x and 6.x. Now that I installed Oracle Linux 7.2 I can't get my scripts to work. The variable is not printed but when I perform the command directly without storing it into a variable, it works perfectly and results in showing the environment variable PATH=.......
Anyone have any idea how to fix this?
Thanks for any help.
Regards,
Dreamline