Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 05 Apr 2020 20:11:28 +0000
From:      "Kralj Karlo" <karlo@klarinet.osamsb.hr>
To:        freebsd-questions@freebsd.org
Subject:   Re: Calling sh from csh
Message-ID:  <b627bc80-546c-47e1-bd68-0b321000e8c7@www.fastmail.com>
In-Reply-To: <8a13c839-6e0c-8a6e-32bf-b4b42dfaff67@cloudzeeland.nl>
References:  <8a13c839-6e0c-8a6e-32bf-b4b42dfaff67@cloudzeeland.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Apr 5, 2020, at 19:48, Jos Chrispijn wrote:
> Can you tell me how I could find out if a shell script runs on csh or sh 
> and then execute it from within the right shell?

The conventional way is to execute the shell script rather than executing
the shell and to rely on the shebang in the first line.

I guess that won't work for you. Why won't it work?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b627bc80-546c-47e1-bd68-0b321000e8c7>