Last active
June 29, 2016 08:55
-
-
Save rdev5/77496655102c0b19b6ed104cd2b187ea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
host="$1" | |
user="$2" | |
database="$3" | |
output="$4" | |
if [ -z "$host" ] || [ -z "$user" ] || [ -z "$database" ] || [ -z "$output" ]; then | |
echo "Usage: $0 <host> <user> <database> <outputfile>" | |
exit | |
fi | |
mysqldump -h "$host" -u "$user" -p "$database" > "$output" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
host="$1" | |
user="$2" | |
database="$3" | |
table="$4" | |
output="$5" | |
if [ -z "$host" ] || [ -z "$user" ] || [ -z "$database" ] || [ -z "$table" ] || [ -z "$output" ]; then | |
echo "Usage: $0 <host> <user> <database> <table> <outputfile>" | |
exit | |
fi | |
mysqldump -h "$host" -u "$user" -p "$database" "$table" > "$output" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
size="$1" | |
if [ -z "$size" ]; then | |
size=32 | |
fi | |
dd if=/dev/urandom bs="$size" count=1 | base64 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment