/[MITgcm]/MITgcm_contrib/jmc_script/add0upto4c
ViewVC logotype

Contents of /MITgcm_contrib/jmc_script/add0upto4c

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Mon Jan 17 14:27:56 2005 UTC (20 years, 5 months ago) by jmc
Branch: MAIN
Changes since 1.1: +19 -9 lines
change to bourne shell script

1 #!/bin/sh
2 xx='0000'$1
3 yy='bbb'
4
5 #count=0 ; echo $count $xx $yy
6 while test $yy != 'aaa'
7 do
8 zz=`echo $xx | sed 's/^0//'`
9 if test $zz = $xx
10 then
11 echo $xx
12 exit 1
13 else
14 xx=$zz
15 yy=`echo $xx | sed 's/^....$/aaa/'`
16 #count=`expr $count + 1` ; echo $count $xx $yy
17 #if test $count = 10 ; then yy='aaa' ; fi
18 fi
19 done
20 echo $xx
21 exit 0

  ViewVC Help
Powered by ViewVC 1.1.22