Restructure functions
This commit is contained in:
@@ -1,5 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
function grepmysql {
|
||||
if [[ -z "$1" ]]; then
|
||||
__func_head "MySQL_SERVER_NAME [WITH_OPTIONS]"
|
||||
echo
|
||||
else
|
||||
if [[ -z "$2" ]]; then
|
||||
grep -i $1 ~/.mysql_pass | awk 'BEGIN{FS=":"}{ print $2 }'
|
||||
else
|
||||
grep -i $1 ~/.mysql_pass | awk 'BEGIN{FS=":"}{ print $2" "$3 }'
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function mysqlo () {
|
||||
if [ -z "$1" ]; then
|
||||
__func_head "SERVER_NAME"
|
||||
|
Reference in New Issue
Block a user