Skip to content

PHP Develop

Blog about PHP development

Tag: shell

Bash Linux commands

Display date:

$ echo "Today is $(date)"

Get script dir:

DIR_NAME=`dirname $0`;

Output data to file:

"start $(date)" 2>> $DIR_NAME/bash.log;
Author fububy@gmail.comPosted on 31st January 201631st January 2016Categories OSTags bash, linux, shellLeave a comment on Bash Linux commands

How to execute a MySQL command from a Linux BASH Shell script?

$ mysql -h DB_HOST -D DB_NAME -u DB_USER -pDB_PASSWORD -e "SHOW PROCESSLIST";
Author fububy@gmail.comPosted on 30th January 201623rd February 2016Categories DatabasesTags bash, linux, mysql, shellLeave a comment on How to execute a MySQL command from a Linux BASH Shell script?

cmu.edu

PHP Develop Proudly powered by WordPress