Skip to content

Instantly share code, notes, and snippets.

@mshafiee
Created January 5, 2019 11:55
Show Gist options
  • Save mshafiee/a476f2dc764a84a481c4aba6a5d3b5c2 to your computer and use it in GitHub Desktop.
Save mshafiee/a476f2dc764a84a481c4aba6a5d3b5c2 to your computer and use it in GitHub Desktop.
#!/bin/bash
while IFS='' read -r line || [[ -n "$line" ]]; do
echo '' | db2struct --host localhost -d farayad --package farayad -p --user root --struct=$line -t $line --gorm --guregu
done < "$1"
usage:
1-show tables;
2-store table name in tablename.txt file.
3- run: bash mysql2go.sh tablename.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment