| 1 |
#!/bin/csh |
#!/bin/sh |
| 2 |
set xx = '000'$1 |
xx='000'$1 |
| 3 |
set yy = `echo $xx | sed 's/^...$/aaa/'` |
yy='bbb' |
| 4 |
|
|
| 5 |
while ( $yy != 'aaa' ) |
#count=0 ; echo $count $xx $yy |
| 6 |
set xx = `echo $xx | sed 's/^0//'` |
while test $yy != 'aaa' |
| 7 |
set yy = `echo $xx | sed 's/^...$/aaa/'` |
do |
| 8 |
# echo $xx $yy |
zz=`echo $xx | sed 's/^0//'` |
| 9 |
end |
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 |
echo $xx |
| 21 |
exit |
exit 0 |