0
運行一個Ruby腳本一個shell腳本我有一個shell腳本雙擊在Mac
#!/bin/bash
echo "starting"
file="path_to_file/ruby_file.rb"
echo $file
ruby $file
echo "ended"
當我從它工作正常,在命令行中運行它。
當我在Finder上雙擊它時,它沒有。
我有一些放在正在打印的紅寶石腳本,但我正在進行文件操作(重命名),他們沒有完成。更重要的是,我得到以下錯誤:
(它結束時,我已經取消自動關閉會話)
-bash: shell_session_update: command not found
這是結果:
/path_to_shell_script/renamer.sh; exit;
starting
/path_to_ruby_script/renamer.rb
ruby is renaming
ruby finished renaming
ended
logout
-bash: shell_session_update: command not found -> This doesn't happen when I run it from the command line.
謝謝。有用。 :)我仍然收到「Sesison Ended(破管),重新啓動它?」有任何想法嗎? –
你在使用iTerm嗎?我GOOGLE了「會話結束了斷管」,並發現這一點,表明在最近的版本中添加了一個選項來禁止此消息:https://groups.google.com/forum/#!topic/iterm2-discuss/SeAdAifYVDo。您可能需要更新您的iTerm軟件才能擁有該選項。 –