在前面这篇文章Linux如何找出用户的创建时间里面讨论了查看用户创建时间的方法,后面自己尝试弄了一个脚本来检查所有用户创建时间脚本,当然更合理的应该叫检查所有用户的密码修改时间比较准确(因为这种方法有条件限制),期间和夕照讨论了一下如何用shell脚本实现,获益良多.下面是整理过后的脚本. #! /bin/bash echo 'this is not the standard method the check the user create date if the user mo…
真是坑爹,就下面的sh,竟然也写了很久! if [ `pwd` != '/usr/xx/bin/tomcat' ] then echo "rstall is not allowed in current dir : `pwd` !" return fi ./bin/rstmst.sh;../tomcat-bb/bin/rstns.sh if 的语法真麻烦, linux if 的语法真是服了! if 后面跟的是 [] , 而不是 () 擦! if 和 then 之间必须换行! ———…
http://linux.about.com/library/cmd/blcmdl1_sh.htm http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html Linux / Unix Command: shCommand LibraryNAMEbash - GNU Bourne-Again SHell SYNOPSISbash [options] [file] DESCRIPTIONBash is an sh…