[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to determine the interpreter





On Fri, Nov 26, 2010 at 21:01, Camaleón <noelamac@gmail.com> wrote:
On Fri, 26 Nov 2010 15:11:07 +0000, 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:

sm01@stt008:~$ ps $$
 PID TTY      STAT   TIME COMMAND
 5002 pts/0    Ss     0:00 bash

Maybe there is a better way :-?

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: [🔎] pan.2010.11.26.15.31.56@gmail.com" target="_blank">http://lists.debian.org/[🔎] pan.2010.11.26.15.31.56@gmail.com


You could try also, the following inside your script.

ls -l /proc/$$/exe


Reply to: