Originally Posted by tank junior
I am new to linux and need to do this in a script.
1. Get all the vars (env command)
2. Set them locally (name, value pair) in script using loop iteration.
vars = 'env'
for name, value in vars:
Ok...we now know what you WANT to do. Now show us what you've DONE. We'll be glad to help, but we're not going to write the script for you. You know about the ENV command, obviously, which can read them, but your second point makes no sense. You say you want to 'set them locally'...well, they're obviously ALREADY set, hence you being able to read them with the ENV command.
Please clarify the question, and post the code you've already written. There are also many bash scripting tutorials you can find on the Internet, which should be able to help you. And is this homework???