Skip to content

Instantly share code, notes, and snippets.

@ValeryDubrava
Created October 17, 2018 07:14
Show Gist options
  • Save ValeryDubrava/d2eac77001107701472a88c1b076b9ef to your computer and use it in GitHub Desktop.
Save ValeryDubrava/d2eac77001107701472a88c1b076b9ef to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
while read line; do
line=$(echo "$line"|tr '\r' ' ')
IFS=, read -a arr <<<"$line"
echo "${arr[0]} ${arr[1]} ${arr[2]}"
json=$(cat <<EOF
["wuletlttoken", "1000000000.0000 ${arr[1]}", ["${arr[0]}", "${arr[2]}", ""]]
EOF
)
echo "$json"
tcleos push action wuletlttoken create "$json" -p wuletlttoken
done < partners.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment