Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #Dintr-o lista de fisiere, sa se afiseze numele celui cu nr max de cuvinte si nr
- maxWords=-1;
- name='nameless';
- echo "Dati numarul de fisiere: "
- read n
- for i in `seq 1 $n`;
- do
- read fileName
- read nrW <<<$(awk -f temalab4.awk $fileName)
- if [ nrW > maxWords ]
- then
- maxWords=$nrW
- name=$fileName
- fi
- done
- echo "$maxWords"
- echo "$name"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement