All pastes #956708 Raw Edit

Someone

public text v1 · immutable
#956708 ·published 2008-03-25 14:41 UTC
rendered paste body
#!/bin/bash 
 
myFileHodn="hodnoceni.txt"

 
 
for (( i=1 ; i <= $# ; i++ )) ;do
     eval arg='$'$i
     if ["$arg" = "-h"] ;then i=`expr $i + 1`; eval arg='$'$i ; myFileHodn=$arg
     elif ["$arg" = "-o"] ;then i=`expr $i + 1`; eval arg='$'$i ; vystupny=$arg
     elif ["$arg" = "-g"] ;then echo nieco sa zmeni
     elif ["$arg" = "-v"] ;then i=`expr $i + 1`; eval arg='$'$i ; omezeni=$arg
     else echo "$arg je neznamy argument." ; exit
     fi
     done
a='NEPUZITY_RETAZEC'

cat $myFileHodn | while read myLineHodn
do
  temphodn="$allFile"
  allFile="$temphodn $myLineHodn" 

  output=`echo $myLineHodn | sed -e "s/ /$a/mg"`
  output=`echo $output | sed -e 's/;/ /mg'`

  counter=0
  for word in $output ; do
    eval xhodn_$counter='`echo $word | sed -e s/$a//mg`'
    let counter++ # increasing counter
  done 
           # dany riadok bude teraz ulozeny v MyLineHodn
            #a jednotlive zaznamy v xhodn_0 - xhodn_x
            #tj nick bude v xhodn_0
b=0
a='5'
  while [ "$a" -lt "$xhodn_2" ] ;do
    a=`expr $a + 5`
    echo $a
  done
 # x=`expr $a-5`
 # y=`expr $a-1`
 # $($x_$y)=`expr $($x_$y)+1`
  #if [ b < $a ] ;then b= $a;
#echo $a
done