tcsh equivalent to bash's --version?

tcsh equivalent to bash's --version?

Post by Michael P. Jenkins Bro » Fri, 01 Nov 2002 06:00:25



is there a way to ask tcsh to return its version?  bash let's one do
"bash --version" and gives something like "GNU bash, version
2.05.8(1)-release (i386-redhat-linux-gnu)".

thanks,

i2k1

 
 
 

tcsh equivalent to bash's --version?

Post by Stephane CHAZELA » Fri, 01 Nov 2002 06:21:27



Quote:> is there a way to ask tcsh to return its version?  bash let's one do
> "bash --version" and gives something like "GNU bash, version
> 2.05.8(1)-release (i386-redhat-linux-gnu)".

Generally, shells define a variable containing their version:

tcsh -c 'echo $version'
bash -c 'echo $BASH_VERSION'
bash -c 'echo ${BASH_VERSINFO[*]}'
zsh -c 'echo $ZSH_VERSION'
ksh -c 'echo $KSH_VERSION'

--
Stphane

 
 
 

tcsh equivalent to bash's --version?

Post by Andreas K?h?r » Fri, 01 Nov 2002 06:39:21


Submitted by "Michael P. Jenkins Brown" to comp.unix.shell:

Quote:> is there a way to ask tcsh to return its version?  bash let's one do
> "bash --version" and gives something like "GNU bash, version
> 2.05.8(1)-release (i386-redhat-linux-gnu)".

> thanks,

> i2k1

The manuals are there for a reason you know.

% echo $version
tcsh 6.10.00 (Astron) 2000-11-19 (unknown-unknown-NetBSD)
options 8b,nls,dl,al,rh,color

--
Andreas K?h?ri               --==::{ Have a Unix: netbsd.org
                             --==::{ This post ends with :wq

 
 
 

tcsh equivalent to bash's --version?

Post by those who know me have no need of my nam » Sat, 02 Nov 2002 13:16:53


in comp.unix.shell i read:

Quote:>ksh -c 'echo $KSH_VERSION'

only pdksh.  real ksh prior to 93 doesn't have anything, and 93 uses the
otherwise illegal word `.sh.version', i.e.,

| ksh93$ echo $KSH_VERSION
|
| ksh93$ echo ${.sh.version}
| Version M 1993-12-28 n-

--
bringing you boring signatures for 17 years

 
 
 

tcsh equivalent to bash's --version?

Post by Keith Thompso » Sat, 08 Feb 2003 07:58:06



Quote:> is there a way to ask tcsh to return its version?  bash let's one do
> "bash --version" and gives something like "GNU bash, version
> 2.05.8(1)-release (i386-redhat-linux-gnu)".

tcsh -c 'echo $version'

(Note that if you use double quotes rather than single quotes, you'll
get the value of the $version variable in your current shell.)

--

San Diego Supercomputer Center           <*>  <http://www.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"

 
 
 

tcsh equivalent to bash's --version?

Post by Keith Thompso » Sat, 08 Feb 2003 10:18:38




> > is there a way to ask tcsh to return its version?  bash let's one do
> > "bash --version" and gives something like "GNU bash, version
> > 2.05.8(1)-release (i386-redhat-linux-gnu)".

> tcsh -c 'echo $version'

> (Note that if you use double quotes rather than single quotes, you'll
> get the value of the $version variable in your current shell.)

It's slightly safer to use

tcsh -f -c 'echo $version'

Without the "-f", it's possible that something in $HOME/.cshrc or
$HOME/.tcshrc could mess with the $version variable.

Yes, it would be nice if tcsh accepted a "--version" option.
Unfortunately, tcsh currently only accepts one-letter options, and
both "-v" and "-V" are already taken.

--

San Diego Supercomputer Center           <*>  <http://www.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"

 
 
 

1. BASH BASH BASH BASH BASH BASH BASH BASH BASH BASH

Is there a proper fixed bash on any of the FTP sites out there?

I know there bash is on the usual sites but I don't know if they are
bugged or not :(

Regards,

Neil.

--


------------------------------------| Edinburgh, EH14 2DE, United Kingdom
**Domino: There`s nothing you can do when you`re the next in line: Domino**

2. xdm not letting me load startkde?!?!

3. ksh, bash, zsh equivalent for tcsh complete-word-fwd?

4. *** Harddisk MAX size ***

5. Handling of the Meta-key in `tcsh' and `bash'

6. Microsoft's Not a Monopoly

7. Does bash have anything like tcsh's `set rmstar'?

8. Linux for Pentium Pro's

9. The 'tcsh' version of the shell

10. bash equivalent to csh's "pushdsilent" ?

11. tcsh 'Word too long' problem (tcsh 6.05, HP/UX)

12. DOES ANYBODY KNOW HOW TO CHANGE A SHELL'S (BASH/TCSH) DEFAULT FONT???

13. What can tcsh do for me that bash can't?