In bash, I can use $? to get the return status of the last command executed.
How do I do the equivilant in csh?
Thanks
~Shea M.
|
|
0
|
|
|
|
Reply
|
smartin (79)
|
8/23/2004 8:45:05 PM |
|
>> On Mon, 23 Aug 2004 14:45:05 -0600,
>> Shea Martin <smartin@arcis.com> said:
> In bash, I can use $? to get the return status of the last
> command executed. How do I do the equivilant in csh?
man csh ->
Environment Variables and Predefined Shell Variables ->
status
hth
t
|
|
0
|
|
|
|
Reply
|
Tony
|
8/23/2004 8:48:00 PM
|
|
Tony Curtis wrote:
>>>On Mon, 23 Aug 2004 14:45:05 -0600,
>>>Shea Martin <smartin@arcis.com> said:
>
>
>>In bash, I can use $? to get the return status of the last
>>command executed. How do I do the equivilant in csh?
>
>
> man csh ->
>
> Environment Variables and Predefined Shell Variables ->
>
> status
>
> hth
> t
Thanks,
I did peruse the man page, but I was looking of for something cryptic like
bourne's $?.
~S
|
|
0
|
|
|
|
Reply
|
Shea
|
8/23/2004 9:57:07 PM
|
|
On Mon, 23 Aug 2004, Shea Martin wrote:
> I did peruse the man page, but I was looking of for something cryptic like
> bourne's $?.
Why are you wasting your time scripting stuff in csh? Do
a search for "csh why not" to see why it's best avoided.
--
Rich Teer, SCNA, SCSA, author of "Solaris Systems Programming",
published in August 2004.
President,
Rite Online Inc.
Voice: +1 (250) 979-1638
URL: http://www.rite-group.com/rich
|
|
0
|
|
|
|
Reply
|
Rich
|
8/23/2004 10:41:28 PM
|
|
Rich Teer wrote:
> On Mon, 23 Aug 2004, Shea Martin wrote:
>
>
>>I did peruse the man page, but I was looking of for something cryptic like
>>bourne's $?.
>
>
> Why are you wasting your time scripting stuff in csh? Do
> a search for "csh why not" to see why it's best avoided.
>
Rich, hmm..... I always thought that csh was not the ideal shell to use
(AKA junk). Thus I was very surprised to see that Sun's Looking Glass
project has most (if not all) of its scripts written in csh. Any
thoughts as to why? I s'pose I could always email Hideya, or post on an
lg3d forum...
|
|
0
|
|
|
|
Reply
|
Beardy
|
8/24/2004 7:42:17 AM
|
|
On Tue, 24 Aug 2004, Beardy wrote:
> Rich, hmm..... I always thought that csh was not the ideal shell to use
> (AKA junk). Thus I was very surprised to see that Sun's Looking Glass
> project has most (if not all) of its scripts written in csh. Any
Oh dear...
> thoughts as to why? I s'pose I could always email Hideya, or post on an
> lg3d forum...
That's what I'd do. My guess is that Hideya uses csh (or a derivative)
as his usual interactive shell, so naturally wrote the scripts in it.
Nothing wrong with using csh as your shell of choice, but writing
scripts in it is NOT a good practice, IMHO.
--
Rich Teer, SCNA, SCSA, author of "Solaris Systems Programming",
published in August 2004.
President,
Rite Online Inc.
Voice: +1 (250) 979-1638
URL: http://www.rite-group.com/rich
|
|
0
|
|
|
|
Reply
|
Rich
|
8/24/2004 5:29:54 PM
|
|
Rich Teer wrote:
> On Tue, 24 Aug 2004, Beardy wrote:
>
>
>>Rich, hmm..... I always thought that csh was not the ideal shell to use
>>(AKA junk). Thus I was very surprised to see that Sun's Looking Glass
>>project has most (if not all) of its scripts written in csh. Any
>
>
> Oh dear...
Indeedi.
>
>
>>thoughts as to why? I s'pose I could always email Hideya, or post on an
>>lg3d forum...
>
>
> That's what I'd do. My guess is that Hideya uses csh (or a derivative)
> as his usual interactive shell, so naturally wrote the scripts in it.
> Nothing wrong with using csh as your shell of choice, but writing
> scripts in it is NOT a good practice, IMHO.
>
Agreed - and your O should not be H ;-)
|
|
0
|
|
|
|
Reply
|
Beardy
|
8/24/2004 7:42:32 PM
|
|
On Tue, 24 Aug 2004, Beardy wrote:
> Agreed - and your O should not be H ;-)
Some people think I need to be more H! :-)
*Shrug* Ah well, ya can't please 'em all...
--
Rich Teer, SCNA, SCSA, author of "Solaris Systems Programming",
published in August 2004.
President,
Rite Online Inc.
Voice: +1 (250) 979-1638
URL: http://www.rite-group.com/rich
|
|
0
|
|
|
|
Reply
|
Rich
|
8/24/2004 10:58:53 PM
|
|
|
7 Replies
797 Views
(page loaded in 0.06 seconds)
|