Last active
April 20, 2017 02:27
-
-
Save cjhgo/01f6ee2a7d7d55596aee73839120040b to your computer and use it in GitHub Desktop.
This file contains 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 | |
#设置终端目录变量 | |
#usage | |
#$`kvset nglog /var/log/nginx` | |
#$cd $nglog | |
#$pwd | |
#$/var/log/nginx | |
if [ $# -eq 0 ] | |
then | |
#echo "No arguments supplied" | |
exit 1 | |
fi | |
echo "$1=$2">>~/.keyvalue | |
echo "export $1=$2" | |
#bashrc source ~/.keyvalue | |
#.keyvalue要有空白行, | |
#这样每次echo才会另起一行 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment