标签:$# 修改 gre .sh 脚本 grep c/s network div
#!/bin/bash if [ $# == 1 ] then HOSTNAME=$1 else echo "脚本执行需要参数,例如[sh *.sh test]" exit fi sed -i "s#`uname -n`#$1#g" /etc/sysconfig/network sed -i "s#`uname -n`#$1#g" /etc/hosts grep $1 /etc/hosts hostname $1
偶尔需要用到,暂且放到博客上,防止要用的时候找不到。。。。
标签:$# 修改 gre .sh 脚本 grep c/s network div
原文地址:http://www.cnblogs.com/uglyliu/p/6137032.html