Results 1 to 2 of 2
HI Guys,
I hope you are well. I am trying to write a script that gets executed every time i open a shell (cshell). I have two questions about that
...
- 02-10-2012 #1Just Joined!
- Join Date
- Apr 2011
- Posts
- 8
passing command output from one command to the next command in cshell
HI Guys,
I hope you are well. I am trying to write a script that gets executed every time i open a shell (cshell). I have two questions about that
1) I need to enter these commands
$ echo $DISPLAY
$ setenv $DISPLAY output_of_echo_$display_command
How can i write a script with the above two commands where my second command takes the output of the first command and executes it?
2) What do i need to do to make this script run every time, i open a shell window
Note that i am doing this in the cshell.
How would i do this in the bash shell?
Please let me know if you have any questions.
THanks
- 02-13-2012 #2Linux User
- Join Date
- Jan 2005
- Location
- Saint Paul, MN
- Posts
- 262
If your login shell is "csh" or "tcsh", then DISPLAY should be set when logging in. If your login shell is not one of these such as BASH, and then switch to "csh" or "tcsh" it will be set.


