All pastes #956860 Raw Edit

Something

public text v1 · immutable
#956860 ·published 2008-03-25 16:46 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'
b=0
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++ 
  done 
           # dany riadok bude teraz ulozeny v MyLineHodn
            #a jednotlive zaznamy v xhodn_0 - xhodn_x
            #tj nick bude v xhodn_0
            
a='4'
  while [ $a -lt "$xhodn_2" ] ;do
    a=`expr $a + 5`
    echo $a
  done
  x=`expr $a - 4`
  interval_$x=`expr + 1`     <-------tuto hadze chybu
  if [ "$b" -lt "$a" ] ;then b=`expr $a`;
  fi
echo cislo $x cislo $b
done