Skip to content

Commit

Permalink
add init
Browse files Browse the repository at this point in the history
  • Loading branch information
hallooyo committed Jan 9, 2016
1 parent 62ff3ee commit 8fc1977
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions bin/hssh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ case $1 in
awk -v v=$env '$5 == v {print $5"---------"$2"\r"}' $temp_file
echo "查询完毕!"
;;
`echo $1 | grep '^\dev'`)
echo "为您查询"$1" 环境列表"
env=`echo $1 | tr 'a-z' 'A-Z'`
awk -v v=$env '$5 == v {print $5"---------"$2"\r"}' $temp_file
echo "查询完毕!"
;;
[1-9]*)
echo "为您查询ip 信息"
printip $1
Expand All @@ -56,7 +62,10 @@ case $1 in
echo "您可以输入第五列中的环境标示,精确查找各环境的服务器信息"
echo "查询完毕!"
;;
*)
echo "无法识别的参数,请重新输入!"
v)
vi $temp_file
;;
*)
echo "无法识别的参数,请重新输入!"
;;
esac
2 changes: 1 addition & 1 deletion conf/init.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash


echo "alias 's=sh $(cd `dirname $0`;pwd)../bin/hssh.sh'" >> $(cd ; pwd)/.bash_profile
echo "alias 's=sh $(cd `dirname $0`;pwd)/../bin/hssh.sh'" >> $(cd ; pwd)/.bash_profile

sort -u $(cd ; pwd)/.bash_profile > 1

Expand Down

0 comments on commit 8fc1977

Please sign in to comment.