It only takes one line appended to a shell script:
echo $_ >status.log
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Håkon Alstadheim <[EMAIL PROTECTED]> writes:
> You don't need a command (at least with the versions of bash I've used
> the last 10 years), just make sure the variable does not get expanded
> before it is assigned to PS1. Like so: PS1='$?\$ '. now try executing
> /bin/true and /bin/false.
Indeed,
On Wed, Aug 15, 2007 at 09:42:16PM +0200, Håkon Alstadheim wrote:
> Ken Irving wrote:
>> On Wed, Aug 15, 2007 at 04:21:17PM +0200, Sven Joachim wrote:
>>
>>> Kamaraju S Kusumanchi <[EMAIL PROTECTED]> writes:
>>>
>>>
>> I want to know if the command exited with status zero or non-zero. C
Ken Irving wrote:
On Wed, Aug 15, 2007 at 04:21:17PM +0200, Sven Joachim wrote:
Kamaraju S Kusumanchi <[EMAIL PROTECTED]> writes:
I want to know if the command exited with status zero or non-zero. Can
this be done in a simple way?
$test -x debian/rules; echo $?
T
On Wed, Aug 15, 2007 at 04:21:17PM +0200, Sven Joachim wrote:
> Kamaraju S Kusumanchi <[EMAIL PROTECTED]> writes:
>
> >>> I want to know if the command exited with status zero or non-zero. Can
> >>> this be done in a simple way?
> >>
> >> $test -x debian/rules; echo $?
> >>
> >
> > Thanks. Exact
Kamaraju S Kusumanchi <[EMAIL PROTECTED]> writes:
>>> I want to know if the command exited with status zero or non-zero. Can
>>> this be done in a simple way?
>>
>> $test -x debian/rules; echo $?
>>
>
> Thanks. Exactly what I am after!
Here's a $0.02 recipe from my ~/.bashrc:
if [ "$PS1" ]; th
Joachim Fahnenmüller wrote:
>> For example, if I do
>>
>> $test -x debian/rules
>>
>> I want to know if the command exited with status zero or non-zero. Can
>> this be done in a simple way?
>
> $test -x debian/rules; echo $?
>
Thanks. Exactly what I am after!
raju
--
Kamaraju S Kusumanchi
h
Hi Kamaraju
On Wed, Aug 15, 2007 at 12:51:06AM -0700, Kamaraju Kusumanchi wrote:
> Let's say I run a command in bash which is run via konsole. How can I view
> its exit status.
>
> For example, if I do
>
> $test -x debian/rules
>
> I want to know if the command exited with status zero or non-
Le Wednesday 15 August 2007, Kamaraju Kusumanchi(Kamaraju Kusumanchi
<[EMAIL PROTECTED]>) a écrit:
Hi,
> Let's say I run a command in bash which is run via konsole. How
> can I view its exit status.
>
> For example, if I do
>
> $test -x debian/rules
try:
test -x debian/rules ; echo $?
HTH,
--
9 matches
Mail list logo