Advertisement
Guest User

Untitled

a guest
May 27th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.65 KB | None | 0 0
  1. nameList ()
  2. {
  3.  cat emplist | cut -c5-19 | grep $name
  4. }
  5. targList ()
  6. {
  7.  cat emplist | grep $name | cut -c44-58
  8. }
  9. teamList ()
  10. {
  11.  cat emplist | grep $name | cut -c31-43
  12. }
  13.  
  14. echo "Please enter the player name."
  15. read name
  16. while echo "Would you like to see the target, (T/t) or team name (M/m)?"
  17. read ans
  18. [ $ans != 'ZZZ' ]
  19. do
  20.  if [[ $ans = [tT] ]]; then
  21.   nameList > names_only
  22.   targList > target_only
  23.   paste names_only target_only
  24.  elif [[ $ans = [mM] ]]; then
  25.   nameList > names_only
  26.   teamList > team_only
  27.   paste names_only team_only
  28.  else
  29.   echo "$0: Please enter a target or team name."
  30.  fi
  31. done
  32. rm names_only team_only target_only
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement