Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- !/bin/bash
- afeladat=-1
- bfeladat=-1
- while read line
- do
- #a resz
- i=`echo $line | cut -f 7 -d "/"`
- if [ "$i" == "-" ] #van olyan fegyver, ahol egy kotojel van...
- then
- i=0
- fi
- if ((i>afeladat))
- then
- afeladat=$i
- afeladatnev=`echo $line | cut -f 1 -d "/"`
- fi
- #b resz
- a=`echo $line | cut -f 3 -d "/"`
- b=`echo $line | cut -f 5 -d "/"`
- if ((a*b>bfeladat))
- then
- bfeladat=$((a*b))
- bfeladatnev=`echo $line | cut -f 1 -d "/"`
- fi
- done < fegyverek
- echo $afeladatnev
- echo $bfeladatnev
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement