Advertisement
jncosideout

dongers.sh

Jul 5th, 2025 (edited)
351
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.97 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. DONGERS='/home/${USER}/Documents/crying-happy-donger-kaomojis-japanese-emoticons.txt'
  4.  
  5. count=0
  6. mapfile -t array < "$DONGERS"
  7. total=${#array[@]}
  8.  
  9. for donger in "${array[@]:0:10}"; do
  10.     echo "$count: $donger"
  11.     ((count++))
  12. done < $DONGERS
  13.  
  14. read -n 1 -p "which donger? (press 'Enter' for more)  " choice
  15. echo ""
  16. if [ $choice ]; then
  17.     echo -n ${array["$choice"]} | xclip -sel clip
  18.     exit
  19. fi
  20.  
  21. for donger in "${array[@]:10:10}"; do
  22.     echo "$count: $donger"
  23.     ((count++))
  24. done < $DONGERS
  25.  
  26. read -n 2 -p "which donger?  " choice
  27. echo ""
  28. if [ $choice ]; then
  29.     echo -n ${array["$choice"]} | xclip -sel clip
  30.     exit
  31. fi
  32.  
  33. remaining=$(( $total - 20 ))
  34. if [ $count -ge 20 ]; then
  35.     for donger in "${array[@]:20:$remaining}"; do
  36.         echo "$count: $donger"
  37.         ((count++))
  38.     done < $DONGERS
  39.  
  40.     read -p "which donger?  " choice
  41.     echo ""
  42.     if [ $choice ]; then
  43.         echo -n ${array["$choice"]} | xclip -sel clip
  44.     fi
  45. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement