[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: install the Korn SHELL program



최용주 wrote:
> I installed the 'ksh', so when I type the command in my terminal. It echoes the '$'.
>
>
>   
Save the attached and make it executable and try it....
#!/bin/ksh
rm *.tmp
rm *.lst
for i in *.type3; do
echo $i >> name.tmp
gawk 'END {print NR}' $i >> nrow.tmp
done

paste name.tmp nrow.tmp > filename.tmp
gawk '{ if ( $2 < 1) print $1}' filename.tmp >> final.lst

for ii in $(cat final.lst) ;do
rm $ii
done

rm *.tmp
rm *.lst
for i in *.type4; do
echo $i >> name.tmp
gawk 'END {print NR}' $i >> nrow.tmp
done

paste name.tmp nrow.tmp > filename.tmp
gawk '{ if ( $2 < 1) print $1}' filename.tmp >> final.lst

for ii in $(cat final.lst) ;do
rm $ii
done


rm *.tmp
rm *.lst
for i in *.type2; do
echo $i >> name.tmp
gawk 'END {print NR}' $i >> nrow.tmp
done

paste name.tmp nrow.tmp > filename.tmp
gawk '{ if ( $2 < 1) print $1}' filename.tmp >> final.lst

for ii in $(cat final.lst) ;do
rm $ii
done

rm *.tmp
rm *.lst
for i in *.type1; do
echo $i >> name.tmp
gawk 'END {print NR}' $i >> nrow.tmp
done

paste name.tmp nrow.tmp > filename.tmp
gawk '{ if ( $2 < 1) print $1}' filename.tmp >> final.lst

for ii in $(cat final.lst) ;do
rm $ii
done

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]