Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- filename="$1"
- threshold=0
- a="ERRORS SPOTTED:"
- while read -r line
- do
- name="$line"
- if [ "$name" = "for" ];then
- a="$a\ncannot process for"
- threshold=`expr $threshold + 1`
- fi
- if [ "$name" = "case" ];then
- a="$a\ncannot process case"
- threshold=`expr $threshold + 1`
- fi
- if [ "$name" = "repeat" ];then
- a="$a\ncannot process xargs"
- threshold=`expr $threshold + 1`
- fi
- if [ "$name" = "while" ];then
- a="$a\ncannot process while"
- threshold=`expr $threshold + 1`
- fi
- done < $filename
- echo $threshold
- echo $a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement