LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problem running small cshell script? (https://www.linuxquestions.org/questions/linux-newbie-8/problem-running-small-cshell-script-928717/)

kaaliakahn 02-10-2012 04:50 PM

problem running small cshell script?
 
Hi I am trying to put the following commands that i have to type manually at the cshell prompt into a cshell script startup.csh which is copied below


echo $DISPLAY
xhost +
rsh ba08lo01
module load incisiv/102/10.20.035
setenv DISPLAY $DISPLAY


When i run the script with source command as follows

$ source startup.csh


I get the following messages on the cshell

ba08ut01:12:0 #this is the output of first command
access control disabled,clients can connect from any host #output of 2nd command
Last Login Sat, Feb 11, 04:01:22 from ba08ut01 #output of last command


I am wondering why lines 3 and 4 are not getting executed in the startup.csh script. If i type these commands on the command prompt, i see them executing and the messages they print out to the screen.

Is there some thing wrong with the syntax?

Please correct me.

Do i have to modify it a lot in case i want to convert it to bash script.

Thanks a lot for your attention

cbtshare 02-10-2012 06:14 PM

TRy:

$(rsh ba08lo01)
$(module load incisiv/102/10.20.035)

kaaliakahn 02-11-2012 06:05 AM

dude!

it did not work. I wish it solved the problem.

cbtshare 02-11-2012 12:04 PM

how are you running the command,as a normal user? ...check if you can run the command as root and as a regular user.

kaaliakahn 02-13-2012 12:05 AM

I am a regular user. I can not get root permissions. Any idea about the solution?


All times are GMT -5. The time now is 08:14 PM.