Skip to content

Instantly share code, notes, and snippets.

@egoarka
Created November 30, 2018 13:38
Show Gist options
  • Save egoarka/ee9d69aa3a091ec746fcc70f9a7a1e42 to your computer and use it in GitHub Desktop.
Save egoarka/ee9d69aa3a091ec746fcc70f9a7a1e42 to your computer and use it in GitHub Desktop.
JS alike destructuring assignment for bash
echo "33:34" | awk -F':' '{ print $1, $2 }' | read a b <<< (cat)
read c d <<< $(echo "21:22" | awk -F':' '{ print $1, $2 }')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment