Advertisement
Guest User

Untitled

a guest
Sep 8th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #!/bin/sh
  2. filename="$1"
  3. threshold=0
  4. a="ERRORS SPOTTED:"
  5. while read -r line
  6. do
  7. name="$line"
  8. if [ "$name" = "for" ];then
  9. a="$a\ncannot process for"
  10. threshold=`expr $threshold + 1`
  11. fi
  12. if [ "$name" = "case" ];then
  13. a="$a\ncannot process case"
  14. threshold=`expr $threshold + 1`
  15. fi
  16. if [ "$name" = "repeat" ];then
  17. a="$a\ncannot process xargs"
  18. threshold=`expr $threshold + 1`
  19. fi
  20. if [ "$name" = "while" ];then
  21. a="$a\ncannot process while"
  22. threshold=`expr $threshold + 1`
  23. fi
  24. done < $filename
  25. echo $threshold
  26. echo $a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement