나의 연구/shell2009. 12. 29. 11:18

#! /bin/csh

cd /nnas8/hyolee/uahnc/grib

set wgrib=/opt/grads-2.0.a3/grads-1.9b4/bin/wgrib

set year=1979
echo $year

while ($year <= 1979)
  set mon=1
  echo $mon
while ($mon <= 12)
  if ($mon <= 9) then
      set dum=0
  else
      set dum=''
  endif
  echo grib2ctl.pl  ./uahnca.pm${year}${dum}${mon}_pres.grb > ${year}${dum}${mon}.ctl
  grib2ctl.pl ./uahnca.pm${year}${dum}${mon}_pres.grb > ${year}${dum}${mon}.ctl
  gribmap -0 -i  ${year}${dum}${mon}.ctl
  echo gribmap -0 -i  ${year}${dum}${mon}.ctl
@ mon++
end
@ year++
end

'나의 연구 > shell' 카테고리의 다른 글

if 문  (0) 2010.02.12
size check  (0) 2009.12.29
tip on command  (0) 2009.12.29
Posted by mclab
나의 연구/shell2009. 12. 29. 11:17

#! /bin/csh

         set ifile=/nnas8/hyolee/uahnc/pm/uahnca.pmh9dec
         echo pmfile=`ls -ltr ${ifile}`
         set pmfile=`ls -ltr ${ifile}`
         set pmsize=$pmfile[5]
         echo ${pmsize}
         if ( $pmsize != 693518336 ) then
            echo "File size of ${ifile} is not equal 693518336 "
            stop
         endif

'나의 연구 > shell' 카테고리의 다른 글

if 문  (0) 2010.02.12
while  (0) 2009.12.29
tip on command  (0) 2009.12.29
Posted by mclab
나의 연구/shell2009. 12. 29. 11:16
 find . -size 0 -exec rm "{}" \;


'나의 연구 > shell' 카테고리의 다른 글

if 문  (0) 2010.02.12
while  (0) 2009.12.29
size check  (0) 2009.12.29
Posted by mclab