daily pastebin goal
66%
SHARE
TWEET

Untitled

a guest Mar 19th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #! /bin/bash
  2.  
  3. declare -A assoc=(
  4.     [foo]="https://example.net"
  5.     [bar]="https://gogo.net"
  6. )
  7.  
  8. declare -a transformed=()
  9.  
  10. for key in "${!assoc[@]}"; do
  11.     transformed+=("${assoc[${key}]}")
  12. done
  13.  
  14. select url in "${transformed[@]}"; do
  15.     echo "Picked: [${url}]"
  16. done
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top