1 頁 (共 1 頁)

Problem on Terminal.app after opening shell script

發表於 : 11/27/2002 2:09 pm
謝孟叡
用 Terminal.app 開 shell script 之後如果 shell script 說 exit, Terminal.app 也只停在 "Process Completed" 就停在那裡, 要怎麼樣自動把這個空殼關掉啊?

Problem on Terminal.app after opening shell script

發表於 : 11/27/2002 2:26 pm
digdog
Maybe...?

圖檔

Problem on Terminal.app after opening shell script

發表於 : 11/27/2002 2:28 pm
謝孟叡
<BLOCKQUOTE><font size="1" face="XYZ">quote:</font><HR>原始發信人 爛狗:
<STRONG>Maybe...?</STRONG><HR></BLOCKQUOTE>

試過了, 一般 shell 使用上沒問題, 開 *.command 就是這樣
圖檔

[ 11-27-2002: 留言編輯者: 永野大神 ]

Problem on Terminal.app after opening shell script

發表於 : 11/27/2002 3:06 pm
digdog
<BLOCKQUOTE><font size="1" face="XYZ">quote:</font><HR>原始發信人 永野大神:
<STRONG>試過了, 一般 shell 使用上沒問題, 開 *.command 就是這樣</STRONG><HR></BLOCKQUOTE>

嗯,跑 .command 時,Terminal 會設成 don't close this window...

Problem on Terminal.app after opening shell script

發表於 : 11/27/2002 4:07 pm
謝孟叡
After talked to digdog on iChat...

1. osascript -l AppleScript -e 'tell Application "Terminal" to close every window whose contents contains "Process completed"'
2. osascript -l AppleScript -e 'tell Application "Terminal" to close window 1'

是可行的方法

Problem on Terminal.app after opening shell script

發表於 : 11/27/2002 11:13 pm
但有 dialog sheet 下滑,要選 terminate。

訊息:

Close window

Closing this window will terminate the following processes inside it: login, tcsh, osascript

考慮 kill terminal 嗎?

Problem on Terminal.app after opening shell script

發表於 : 11/28/2002 9:14 am
謝孟叡
<BLOCKQUOTE><font size="1" face="XYZ">quote:</font><HR>原始發信人 悲:
<STRONG>但有 dialog sheet 下滑,要選 terminate。

訊息:

Close window

Closing this window will terminate the following processes inside it: login, tcsh, osascript

考慮 kill terminal 嗎?</STRONG><HR></BLOCKQUOTE>

if you didn't launch that applescript in terminal.app, that shouldn't happen.

Problem on Terminal.app after opening shell script

發表於 : 11/28/2002 11:53 pm
<BLOCKQUOTE><font size="1" face="XYZ">quote
if you didn't launch that applescript in terminal.app, that shouldn't happen.


不用 Terminal.app 執行 osascript 此 shell command,少許難度。

小弟詮釋原問題為 "在 Terminal 的視窗中輸入 exit 的指令,可否 logout 及同時自動關閉此視窗?"

有點混淆。

Problem on Terminal.app after opening shell script

發表於 : 11/29/2002 6:28 am
謝孟叡
<BLOCKQUOTE><font size="1" face="XYZ">quote:</font><HR>原始發信人 悲:
<STRONG>
小弟詮釋原問題為 "在 Terminal 的視窗中輸入 exit 的指令,可否 logout 及同時自動關閉此視窗?"
有點混淆。</STRONG><HR></BLOCKQUOTE>

Sorry, I didn't clarify the problem very well. The scenario is if you open a file *.command (no matter whether you used Terminal.app or Finder to open it), you will launch Terminal.app and your shell to parse the *.command file. Then, if your command script finished, then terminal window won't close automatically. (see the picture I post in previous article.)

Problem on Terminal.app after opening shell script

發表於 : 11/29/2002 7:24 pm
明白了:)