Visit Our UNIX and Linux User Community


at crontab tcsh setenv: command not found


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers at crontab tcsh setenv: command not found
# 1  
Old 10-18-2008
at crontab tcsh setenv: command not found

i have written a script "master.shell" which is in the path:
Code:
/a/homes.surrey.ac.uk/pgt_fs_002/bl00001/phd/griddata/shell/master.shell

Code:
====================================
#/usr/local/bin/tcsh
setenv GLOBUS_LOCATION /grid/software/globus3
setenv PATH /grid/software/globus3/bin:/grid/software/condor/bin:/grid/quirk/quirk2/linux/main:/user/pgt2/bl00001/bin.i686:/user/pgt2/bl00001/bin:/usr/local/bin:/opt/bin:/usr/bin:/bin:/usr/X11R6/bin:.
setenv LD_LIBRARY_PATH /grid/software/globus3/lib:/opt/lib
setenv GLOBUS_TCP_PORT_RANGE=64000,65000
 
#........................ some job codes here, it can be excuted when i only run script
=======================================

and it work perfect when i just use ./master.shell or /a/homes.surrey.ac.uk/pgt_fs_002/bl00001/phd/griddata/shell/master.shell

but when i trying to run it with at or crontab say

Code:
at 10:00 OCT 18
 
at>/a/homes.surrey.ac.uk/pgt_fs_002/bl00001/phd/griddata/shell/master.shell
at><ctrl+d>

job submitted

but it reported to my email:
Code:
"/a/homes.surrey.ac.uk/pgt_fs_002/bl00001/phd/griddata/shell/master.shell: setenv: command not found"

i am not root user for the system, i wondered if it is some problem with user right??? or i have to change into other shell???

could anyone can help me with this please.........
# 2  
Old 10-18-2008
Hi.

In place of:
Code:
#/usr/local/bin/tcsh

try
Code:
#!/usr/local/bin/tcsh

If that does not work, check to see where tcsh really is and use that path with "#!" ... cheers, drl
 

Previous Thread | Next Thread
Test Your Knowledge in Computers #385
Difficulty: Easy
The Linux uptime command show how long the hard drive has been powered down.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Tcsh script - sed command for special characters

Hi, I am using sed command to replace following line in gz file- sed -n 's/""COS_12_TM_1" ( 1101110101001001010011110100000010110100010010000000100000000010XX010000000 )"/""COS_12_TM_1" ( 110111010100100101001111MM00000010110100010010000000100000000010XX010000000 )"/g' filename.gz $x=... (4 Replies)
Discussion started by: Preeti Chandra
4 Replies

2. UNIX for Dummies Questions & Answers

Tcsh command for assigning output of awk to variable

Hi I have a text file with 2 values and I am trying to assign each value to a variable and then write those to text files. So if the textfile is data.txt with 2 values x and y I want to assign mean=x, and stdev=y and then write these out in text files alongwith the id ($id has already been... (6 Replies)
Discussion started by: violin
6 Replies

3. Shell Programming and Scripting

Script working when run manually but not in crontab showing path not found

i have a script running using variable defined in .profile when i run that script manually its working but when i run the same script through cron its giving path not found I had defined path in .profile (3 Replies)
Discussion started by: raj_saini20
3 Replies

4. Solaris

After command setenv auto-boot false machine's console not displaying

hi Alll, I want to install solaris 10 on exixting solaris mahcine. I tried for OK boot cdrom-install but it gave me fatal error - disk not bootable , boot command disable so i tried with ok setenv auto-boot? false Ok reset-all after this server rebooted automatically and... (2 Replies)
Discussion started by: sunray
2 Replies

5. Shell Programming and Scripting

running zsh command in tcsh

Hi all is there a way to run zsh commands in a tcsh shell thanks (3 Replies)
Discussion started by: ab52
3 Replies

6. UNIX for Dummies Questions & Answers

command substitution with tcsh

I was trying to modify my .cshrc file so that the full path would always be displayed in my command prompt. After doing a search, I was able to accomplish this by adding these lines to my .cshrc file: alias setprompt 'set prompt="%/% "' setprompt alias cd 'chdir \!* &&... (1 Reply)
Discussion started by: Special_K
1 Replies

7. UNIX for Dummies Questions & Answers

setEnv.sh is found in which directory(path)

Hi, I am new to Unix.I want to set the path and classpath setting for JDK1.4,Weblogic 9.2 and Oracle 9? So i need to set those settings in setEnv.sh file. But i am unable to find that file in my unix environment? Pls. do tell me where this setEnv.sh is stored? In which directory or path?... (8 Replies)
Discussion started by: sachin.tendulka
8 Replies

8. Shell Programming and Scripting

how can i check in csh if command found or not found ?

hello all im trying to use in sun Solaris the information received from the top command now i several machines that dont have install the top program so when im running the script im geting error saying after im running this code : set MemoryInfo = `top | grep Memory` if (... (2 Replies)
Discussion started by: umen
2 Replies

9. Shell Programming and Scripting

0: Event not found. in tcsh

Hello all I have this simple script that checking if file exist but when Im running it im getting error here is the script : #!/usr/bin/tcsh -fx set mod_test = "mod_test" if (-e $mod_hsf) then echo "File Here !!" else echo "File Not Here !!" endif And here is the error .. ... (1 Reply)
Discussion started by: umen
1 Replies

10. UNIX for Advanced & Expert Users

tcsh read command ......?

i have just started to use the tcsh shell as a sort of personal challenge since I see so many users using other shells than just bash... I have written a spcript that is quite lengthy but it is in bash shell and gives an error message in tcsh shell so I cut the script in half and basically... (4 Replies)
Discussion started by: moxxx68
4 Replies

Featured Tech Videos