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

Re: OT: coloured text?



On Sun, Jan 07, 2024 at 07:12:38PM +0000, Michael Kjörling wrote:
> On 7 Jan 2024 14:03 -0500, from greg@wooledge.org (Greg Wooledge):
> > The shebang tells the kernel which shell to execute to interpret your
> > script.  So, you match it up to whichever shell you're writing for.
> 
> Or perhaps rather which interpreter to use to execute the file.

"Interpreter" is the traditional word for the program executed by the
kernel, yes.

> Examples of shebang lines which aren't for "shells" in the traditional
> sense might be:
> 
> #!/usr/sbin/nft -f
> 
> #!/usr/bin/env python3
> 
> #!/usr/bin/perl

Python and perl are both scripting languages.  I don't know what nft is.

> or if you are feeling evil... :-)
> 
> #!/bin/sed -e 1d

This is not a valid shebang.  You're only permitted ONE argument after
the interpreter name.  You're going to execute /bin/sed '-e 1d' 'filename'
with this.


Reply to: