`
weitao1026
  • 浏览: 992032 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

linux 如何开机自动运行sh脚本

 
阅读更多
  1. linux 如何开机自动运行某sh脚本。比如开机自动运行 /test.sh
    第二个问题,还有什么办法可以确定test.sh已经正确运行了
  2. 要开机 运行只需将它加入到 rc.local ,一般为/etc/rc.d/rc.local 在其中加入以下行:
  3. sh /path/to/test.sh
  4. 使用linux全局变量$?可以确定是否执行,如
    if [$? eq 0]
        then

  5.                 echo "succeed!"

        fi

#modified some typo --update @22:48

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics