Skip to content

Instantly share code, notes, and snippets.

@kjetilho
Created February 19, 2019 22:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kjetilho/ff73705786804563a7c64d132ee5bdac to your computer and use it in GitHub Desktop.
Save kjetilho/ff73705786804563a7c64d132ee5bdac to your computer and use it in GitHub Desktop.
#! /bin/bash
declare -A pvalue
parse_plist() {
declare -a pl=$1
pvalue=()
local i=0
while [[ i -lt ${#pl[@]} ]]
do
pvalue[${pl[ i ]}]=${pl[ i+1 ]}
i=$(( i + 2 ))
done
}
parse_plist '(:iv "1m687rP6n8Ch7VfNu0joEw==" :length 2 :message "iFfFOl/sMxLb6ExwOuxFvsnvU1L1RNp4uarw1PHSR6M=")'
echo "IV is ${pvalue[:iv]}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment