Anand, sorry for the private ..
On Sun, Nov 28, 2010 at 8:56 AM, Anand Sivaram aspn...@gmail.com wrote:
Install realpath package.
Then try
realpath /proc/$$/pid
Or without installing that package: readlink -f /proc/$$/pid
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
On Fri, Nov 26, 2010 at 23:11, Stephen Powell zlinux...@wowway.com wrote:
On Fri, 26 Nov 2010 11:40:32 -0500 (EST), Joao Ferreira wrote:
seems that $0 simply contains the program being run and not the
interpreter that is running it...
Hmm. You're right.
echo $0
works at a shell
hello all,
considering sh, bash and csh, can I somehow, inside a script, determine
if I'm being run with any of these 3 shells...
I need to determine wich interpreter is running me...
thx
Joao
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of
On Fri, 26 Nov 2010 15:11:07 +, Joao Ferreira gmail wrote:
considering sh, bash and csh, can I somehow, inside a script, determine
if I'm being run with any of these 3 shells...
I need to determine wich interpreter is running me...
A quick Google tour says:
s...@stt008:~$ ps $$
PID
On Fri, Nov 26, 2010 at 21:01, Camaleón noela...@gmail.com wrote:
On Fri, 26 Nov 2010 15:11:07 +, Joao Ferreira gmail wrote:
considering sh, bash and csh, can I somehow, inside a script, determine
if I'm being run with any of these 3 shells...
I need to determine wich interpreter is
On Fri, 26 Nov 2010 10:11:07 -0500 (EST), Joao Ferreira wrote:
considering sh, bash and csh, can I somehow, inside a script, determine
if I'm being run with any of these 3 shells...
I need to determine wich interpreter is running me...
The login shell is set in /etc/passwd on a
On Fri, 2010-11-26 at 11:27 -0500, Stephen Powell wrote:
If a script wants to know which shell is running it, the
variable $0 might work. For example,
echo $0
I tried this... but see what I got:
j...@squeeje:~$ cat sh.sh
#!/bin/sh
echo $0
j...@squeeje:~$ cat bash.bash
#!/bin/bash
If you want to know if you're running in bash, you can test for the
variable BASH_VERSION.
if [ ! -z $BASH_VERSION ]; then
echo I am running in bash
exit
fi
echo I am running in sh
--
Burton Samograd
--
To
On Fri, 26 Nov 2010 11:40:32 -0500 (EST), Joao Ferreira wrote:
seems that $0 simply contains the program being run and not the
interpreter that is running it...
Hmm. You're right.
echo $0
works at a shell prompt, but not within a script. I tried it
within a script, sort of, by sourcing
9 matches
Mail list logo