My Shell Script Help

2015年2月12日 星期四

return value from shell script

ref: http://tldp.org/LDP/abs/html/exit-status.html

是用 exit 指令。
exit 123
然後 caller 用 $? 就可以取得上一個 script exit 的值。
張貼者: checko 於 凌晨1:30 0 意見
以電子郵件傳送這篇文章BlogThis!分享至 X分享至 Facebook分享到 Pinterest
標籤: command, control, variable
較新的文章 較舊的文章 首頁
訂閱: 文章 (Atom)
  • array (1)
  • build_in (1)
  • command (9)
  • control (3)
  • cron (1)
  • example (6)
  • file (3)
  • find (4)
  • flow (2)
  • logic (2)
  • login (1)
  • replace (2)
  • sed (5)
  • ssh (1)
  • string (4)
  • tool (2)
  • variable (5)
  • xargs (3)

網誌存檔

  • ►  2020 (5)
    • ►  8月 (1)
    • ►  7月 (2)
    • ►  6月 (2)
  • ►  2019 (1)
    • ►  4月 (1)
  • ▼  2015 (3)
    • ►  6月 (1)
    • ▼  2月 (1)
      • return value from shell script
    • ►  1月 (1)
  • ►  2014 (2)
    • ►  10月 (1)
    • ►  5月 (1)
  • ►  2013 (3)
    • ►  12月 (2)
    • ►  1月 (1)
  • ►  2012 (7)
    • ►  10月 (1)
    • ►  8月 (1)
    • ►  7月 (2)
    • ►  5月 (1)
    • ►  4月 (2)
  • ►  2011 (11)
    • ►  8月 (1)
    • ►  7月 (1)
    • ►  6月 (1)
    • ►  5月 (3)
    • ►  4月 (5)
簡單主題. 技術提供:Blogger.