Hello,
In Bourne shell scripts I use the export command to ensure the value of a variable remains available after the script ends.
In the below script that value for my DISPLAY variable is not retained in my C-Shell environment after my script ends.
1. Does C-Shell variables require an export type command too? If yes, what is it?
2. What can you recommend to retain the value of my DISPLAY variable after my C-Shell script has ended?
Thanks,
Michael
In Bourne shell scripts I use the export command to ensure the value of a variable remains available after the script ends.
In the below script that value for my DISPLAY variable is not retained in my C-Shell environment after my script ends.
Code:
/bin/echo "Enter hostname or IP to redirect DISPLAY to: \c"
set REMOTE_HOST=(`line`)
setenv DISPLAY {$REMOTE_HOST}:0
/bin/echo "$DISPLAY" [COLOR=green]<=== This displays correctly[/color]
1. Does C-Shell variables require an export type command too? If yes, what is it?
2. What can you recommend to retain the value of my DISPLAY variable after my C-Shell script has ended?
Thanks,
Michael