Advertisement
PAULDC

Untitled

Apr 27th, 2011
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.18 KB | None | 0 0
  1. bin/bash
  2. count=0
  3. echo $1 $2
  4. while read word1
  5.     do
  6.     printf "%s\n" "$word1"
  7.     if [ "$2" = "$word1" ]
  8.         then
  9.         count="$((count+1))"
  10.         fi
  11.     done < $1
  12. printf "%s = %d" $2 $count
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement