rindou:eXXXXXX:[78] cat /etc/redhat-release Red Hat Linux release 9 (Shrike) rindou:eXXXXXX:[79] dmesg | head -1 Linux version 2.4.20-8 (bhcompile@porky.devel.redhat.com) (gcc version 3.2.2 200 30222 (Red Hat Linux 3.2.2-5)) #1 Thu Mar 13 17:54:28 EST 2003 rindou:eXXXXXX:[80] echo $? 0 rindou:eXXXXXX:[81] dmesg | head -1 | grep "Red Hat" Linux version 2.4.20-8 (bhcompile@porky.devel.redhat.com) (gcc version 3.2.2 200 30222 (Red Hat Linux 3.2.2-5)) #1 Thu Mar 13 17:54:28 EST 2003 rindou:eXXXXXX:[82] echo $? 141 rindou:eXXXXXX:[83] dmesg | head -1 Linux version 2.4.20-8 (bhcompile@porky.devel.redhat.com) (gcc version 3.2.2 200 30222 (Red Hat Linux 3.2.2-5)) #1 Thu Mar 13 17:54:28 EST 2003 rindou:eXXXXXX:[84] echo $? 141
シェル (csh) の問題? 0 なのか 141 なのかはっきりしてください。一応、141 が返ってるところでは全て 0 が返るのが正しい動作。