The UNIX and Linux Forums  
Helloやアメリカ合衆国へようこそ! UNIXおよびLinuxフォーラム!訪問し、当社のグローバルコミュニティに参加いただきありがとうございます。

Go Back   UNIXおよびLinuxフォーラム > トップフォーラム > シェルプログラミングとスクリプティング
Googleのunix.com



シェルプログラミングとスクリプティング KSH 、 CSH 、 shに、 bashの、はPerl 、 PHPは、削除するsed 、 Awkの、他のシェルスクリプトやシェルスクリプト言語についての質問の投稿はこちら。

その他のUNIXおよびLinuxフォーラムトピックは参考にすること
スレッド スレッドスターター フォーラム 返信 最後の投稿
cronジョブリターン端子と異なるステータスコード isaac_ho シェルプログラミングとスクリプティング 1 2008年6月2日 01:12午前
終了ステータス( $の戻り? ) ジプシー HP - UX 1 2008年3月12日 07:07午前
以前のすべての実行状態を返します mpang_ シェルプログラミングとスクリプティング 4 2006年6月27日 03:58午前
FTPのステータスを返す blt123 シェルプログラミングとスクリプティング 12 2005年7月21日 06:48午前
リターン状態... Shaz シェルプログラミングとスクリプティング 7 2002年11月19日 06:35午前

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek を搭載 Powered by Google
 
LinkBack スレッドツール このスレッドを検索 スレッドを評価 表示モード
  #1固定リンク)  
Old 2006年6月28日
new2ss new2ss is offline
登録ユーザー
  
 

参加日: 2006年1月
投稿数: 133
ステータスを返すかどうかを確認のSCP

こんにちはすべて

下記の抜粋である私 perlの コード
コード:
system ("scp -pq  $dest_file $path");
どうすればできるかわなのリターン状態ですか?つまり、どうやって知ることができる場合は、 SCPが失敗?
  #2固定リンク)  
Old 2006年6月28日
blowtorch's Avatar
ジェット機 blowtorch is offline Forum Advisor  
サポーター
  
 

参加日: 2004年12月
場所:シンガポール
投稿数: 2,350
の投稿者 perlの 5.8のmanページ:
HTMLコード:
 The return value is the exit status of the program
             as returned by the "wait" call.  To get the actual
             exit value shift right by eight (see below).  See
             also "exec".  This is not what you want to use to
             capture the output from a command, for that you
             should use merely backticks or "qx//", as described
             in "`STRING`" in perlop.  Return value of -1
             indicates a failure to start the program (inspect $!
             for the reason).

             Like "exec", "system" allows you to lie to a program
             about its name if you use the "system PROGRAM LIST"
             syntax.  Again, see "exec".

             Because "system" and backticks block "SIGINT" and
             "SIGQUIT", killing the program they're running
             doesn't actually interrupt your program.

                 @args = ("command", "arg1", "arg2");
                 system(@args) == 0
                      or die "system @args failed: $?"

             You can check all the failure possibilities by
             inspecting $? like this:

                 $exit_value  = $? >> 8;
                 $signal_num  = $? & 127;
                 $dumped_core = $? & 128;

             or more portably by using the W*() calls of the
             POSIX extension; see perlport for more information.
詳細については、 perlfuncのmanページを確認してください。 perlfuncのmanページには、 MANPATHを設定することで、 " <perl_install_dir> /男"ディレクトリなどにアクセスすることができます。
  #3固定リンク)  
Old 2006年6月28日
new2ss new2ss is offline
登録ユーザー
  
 

参加日: 2006年1月
投稿数: 133
やあ、
それは私がしなければならないのはどういう意味
コード:
 if ($? = -1) print $! ;# to output error message
else print "success"
私は上記のようなものとなった" $みました!デバイス用\u003d不適切なIOCTLを" 。
私は$を使うのですか?誤って?

ジェット機こんにちは、私は自分のコードを修正し、多くのworked.thanks
コード:
$exit_value  = $? >> 8;
if ($exit_value != 0) 
	{print "Sending of file NO\n";}
	else 
	{print "Sending of file DONE\n";}

編集new2ssで最終; 2006年6月29日に 01:29午前..
Closed Thread

ブックマーク

タグ
デバイスに不適切なIOCTLをperlのperlのシフトシフトperlのシフト

スレッドツール このスレッドを検索
このスレッドを検索

高度な検索
表示モード このスレッド
このスレッド

投稿ルール
あなた ことができない。 新しいスレッドを投稿
あなた ことができない。 返信の投稿
あなた ことができない。 添付ファイルの投稿
あなた ことができない。 自分の投稿を編集

BBコード なる 〜の上に
スマイリー なる 〜の上に
[イメージ] コードは 〜の上に
HTMLコードは、 オフ
トラックバック なる 〜の上に
ピングバック なる 〜の上に
Refbacks なる 〜の上に




すべてGMT -4です。現在の時刻は 03:52午前


提供: vBulletin、著作権© 2000 - 2006、Jelsoft企業株式会社。言語翻訳による電源
vBCredits v1.4著作権© 2007 - 2008 、 PixelFXスタジオ
は、 UNIXおよびLinuxフォーラムのコンテンツ著作権© 1993 〜 2009 。すべての権利を管理しReserved.Ad RedTyger

コンテンツ関連のURLで vBSEO 3.2.0