I have some csh and awk scripts on path
/nethome/chrisd/HSeis/TommyCD/TommyCD-1101/Scripts
Usually I have a working directory from where I run the scripts by having a soft link to the Scripts directory
in the directory above the working one
For example from
/nethome/chrisd/HSeis/TimeDistance/TimeDistance-1101/B-rgdt0p25/A-Synt/A-jcdint
I can run a csh program using
../Scripts/prog.csh
Now, this is where I get confused. prog.csh calls two awk programs like this
if (($nAnomaly == 1) && ) then
awk -v anomaly=$Anom -v zloc="$zmin/$zmax" -v dz=$dz \
-v cols=$cols -v maxdepth=$maxdepth \
-f $spath/create-anomaly-zc.awk $fref.zc > $fmod.zc
else if ($nAnomaly == 2) then
awk -v anomaly="$nAnom/$pAnom" -v zloc="$zmin/$ztran/$zmax" \
-v dz=$dz -v cols=$cols -v maxdepth=$maxdepth \
-f $spath/create-anomaly-zc.awk $fref.zc > $fmod.zc
endif
awk -v xi="$xix/$xiz" -v xf="$xfx/$xfz" \
-f $spath/convert-zc-cmod.awk $fmod.zc > $fmod.cmod
As you can see I have included the variable spath which I set to the full path to the awk scipt
set spath = /nethome/chrisd/HSeis/TommyCD/TommyCD-1101/Scripts
I'm not sure what would be the best way to call the two awk scripts, they are found in the same directory as the .csh file