Hi all,
I have a series of files I want to put into a for loop for subsequent action. The files are all named in the same way:
(somenumber)_spgr+acpc.img
10202_spgr+acpc.img
3287_spgr+acpc.img
h6785_spgr+acpc.img
Here is the loop I've been trying to use, but it doesn't seem to work. Any help would be appreciated.
#################################################
#!/bin/csh -ef
foreach SUBJ ( `ls *_spgr.img | sed 's/.img//g' `)
set SUBJ = ${1}_spgr
echo $SUBJ
#################################################
~Czar
--- You must not fight too often with one enemy, or you will teach him all your tricks of war.
I have a series of files I want to put into a for loop for subsequent action. The files are all named in the same way:
(somenumber)_spgr+acpc.img
10202_spgr+acpc.img
3287_spgr+acpc.img
h6785_spgr+acpc.img
Here is the loop I've been trying to use, but it doesn't seem to work. Any help would be appreciated.
#################################################
#!/bin/csh -ef
foreach SUBJ ( `ls *_spgr.img | sed 's/.img//g' `)
set SUBJ = ${1}_spgr
echo $SUBJ
#################################################
~Czar
--- You must not fight too often with one enemy, or you will teach him all your tricks of war.