Guest User

Untitled

a guest
May 16th, 2018
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.36 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. [ ${#@} -ne 2 ] || { echo "Usage: $0 <loginfile> <passwordfile>" >&2; exit 1; }
  4.  
  5. DELIM=';'
  6. IFS=",$IFS"
  7.  
  8. exec 3<$1
  9. exec 4<$2
  10.  
  11. while read -u 3 l && read -u 4 p; do
  12.     logins=(${logins[@]} $l)
  13.     passwords=(${passwords[@]} $p)
  14. done
  15. for ((i=0; i<${#logins}; i++)); do
  16.     echo "${logins[$i]}${DELIM}${passwords[$i]}"
  17. done
  18.  
  19. 3<&-; 4<&-
Add Comment
Please, Sign In to add comment