'I keep getting error "Directory stack not that deep" I have adjusted the <= sign but to no avail
My code below wont run due to " Directory stack not deep error...Pls tell me what's wrong. I suspect the error is in the while loop. I have made several adjustments but nothing works
#!/bin/csh -f
#set verbose
#Lab 4 Preprocessing
setenv DATA /gaia/home/copara/Documents/eseis/su
echo $ DATA
setenv PROCDATA /gaia/home/copara/Documents/eseis/processed
echo $ PROCDATA
set ifldr=1001
echo $ifldr
while ($ifldr <=1162)
setenv shot shotgather.su
setenv shotfile $PROCDATA/$ifldr$shot
setenv chan channel.su
setenv chanfile $PROCDATA/$ifldr$chan
setenv vibe vibro.su
setenv vibefile $PROCDATA/$ifldr$vibe
setenv corr corr.su
setenv corrfile $PROCDATA/$ifldr$corr
suwind key=fldr min=$ifldr max=$ifldr <$DATA/data.su>$shotfile
suwind key=tracf min=1 max=144 <$shotfile>$chanfile
suwind key=tracf min=145 max=145 <$shotfile>$vibefile
suxcor <$chanfile sufile=$vibefile vibroseis=7000 >$corrfile
@ifldr=$ifldr+1
end
Solution 1:[1]
Add a space between <= and 1162 and after @. csh is space-sensitive. Here is an example:
% @a=1
@a=1: Command not found.
% @ a=1
% echo $a
1
% @ a=$a+1
@: Badly formed number.
% @ a=$a + 1
% echo $a
2
% @ a++
% echo $a
3
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | fork2execve |
