Understanding someone else's csh script...

Hello all. I suspect this will be a simple case for an experienced csh scripter, but google is getting me nowhere on this one.

I'm trying to get someone else's set of scripts to work for me, and it's choking when the following script gets called:

#! /bin/csh 
if (x$1 == x) then
echo ' you must give a file name '
exit
endif
set name=$1:r
#echo 
#echo started $name
#echo
$name.job >&! $name.error
exit

It's meant to submit a series of .job files to the queue of a cluster, but something is going haywire here. The line "set name=$1:r" is baffeling to me, so if you can let me know what that means/does, I'd very much appreciate it.

Cheers.

:r is a modifier that removes a file extension.

% cat myScript
#!/usr/bin/env csh

set name=$1:r

echo $name.job

% ./myScript hello.txt
hello.job
%

I found that out by reading the csh manual page :wink: