Advertisement
Guest User

Untitled

a guest
Apr 16th, 2010
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.23 KB | None | 0 0
  1. count=1
  2. saveIFS="$IFS"
  3. IFS=$'\n'
  4. array=($(<TEST.txt))
  5. IFS="$saveIFS"
  6. echo ${array[0]}    # output: EXAMPLEfoo
  7. echo ${array[1]}    # output: EXAMPLEbar
  8. for i in "${array[@]}"; do echo "  "AD"$count = "$i""; $((count=count+1)); done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement