Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- max='0'
- infile='tankor_orarend.txt'
- for i in `seq 25` ; do
- act=`head -n$i $infile | tail -1 | tr -cd '+' | wc -c`
- if [ $act -gt $max ] ; then
- max=$act
- max_idx_array=''
- fi
- if [ $act -eq $max ] ; then
- max_idx_array="$max_idx_array $i"
- fi
- done
- echo "A legtöbb ember, aki egyszerre ráér, az "$max", és ekkor érnek rá focizni:"
- for i in $max_idx_array; do
- head -n$i $infile | tail -1 | cut -f1 -d:
- done
Add Comment
Please, Sign In to add comment