I have a requirement to change a string of characters that appears in any of my environment variables to a new string and apply the changes to my current unix session. I have this so far :
env | sed "s/^/export /" | sed "s/old/new"
I now wish to run the output from this command to update my current unix session via the . (dot) command. How can I do this without writing the output to a temp file and running that. I'd like to pipe the output from the above to the . command, something like this :
env | sed "s/^/export /" | sed "s/old/new" | .
or
env | sed "s/^/export /" | sed "s/old/new" | . -
but neither works.
Can you help
TIA
Cardy
env | sed "s/^/export /" | sed "s/old/new"
I now wish to run the output from this command to update my current unix session via the . (dot) command. How can I do this without writing the output to a temp file and running that. I'd like to pipe the output from the above to the . command, something like this :
env | sed "s/^/export /" | sed "s/old/new" | .
or
env | sed "s/^/export /" | sed "s/old/new" | . -
but neither works.
Can you help
TIA
Cardy