2013-08-07

Shebangという謎な事実上業界標準について


ShebangUNIX#!sheWikipediaShebang


#! 文字列 [改行]

Shebang#!exec

shebang使

Wikipedia

ShebangUnix 78BSDUnix 8使4.2BSD

Shebang

#!

OS#!execshebangOS

OS

OS#!
#! インタプリターへのパス 引数1引数2引数3 ... [改行]



OS#!
#! インタプリターへのパス 引数 [改行]

shebang
#! /usr/bin/interpreter -a -b -c

"-a -b -c"

使UNIXOSGNU/Linux

GNU-abc

env

perl使shebangshebang使



Shebang (Unix) - Wikipedia, the free encyclopedia
shell - how to use multiple arguments with a shebang (i.e. #!)? - Stack Overflow

GNU bash
$ NAME=VALUE COMMAND


$ env NAME=VALUE COMMAND

GNU bash

Bourne-Again SHell manual - GNU Project - Free Software Foundation (FSF)

11 comments:

Anonymous said...

[]
CRLFWindowsLinux


August 7, 2013 at 4:48PM
Anonymous said...


?

3.7.4 Environment

The environment for any simple command or function may be augmented temporarily by prefixing it with parameter assignments, as described in Shell Parameters. These assignment statements affect only the environment seen by that command.


August 7, 2013 at 4:55PM
said...






August 7, 2013 at 5:10PM
sfish said...


1
'#' 2 '@', '#', '$', '%' 

Linux  FreeBSD 
---
#/bin/sh
echo "test"
echo $*
---


August 7, 2013 at 8:33PM
Anonymous said...


shell


August 7, 2013 at 9:04PM
Anonymous said...


$ NAME=VALUE COMMAND bourne shellKernighan/Pike"The Unix Programming Environment"envenv



August 7, 2013 at 9:29PM
Anonymous said...


Shebang
#(sharp)!(bang)


August 7, 2013 at 10:24PM
said...


#(U+0023)SharpNumber sign
(U+266F)
hash bang
shesh()



August 7, 2013 at 11:35PM
Anonymous said...


GNU Smalltalk

#!/bin/sh
"exec" "gst" "-I" "SmalltalkDB.image" "-f" "$0" "$0" "$@"
"exit"


October 29, 2013 at 1:14AM
Anonymous said...


shebang  unix OS execexecve(2)


May 23, 2020 at 6:52PM
Anonymous said...


sharp 

> #(U+0023)SharpNumber sign

 US-ASCII (7bit) ISO-Latin-1 使

hyphen-minus em dash  en dash 使number sign  sharp 使
 number sign  sharp 

jargon file  ascii 

> Common: number sign; pound; pound sign; hash; sharp; crunch ; hex; [mesh]. Rare: 

Common


sharp bang 

1995 jargon file  shebang 

> [possibly a portmanteau of sharp bang] The character sequence #! that frequently begins executable shell scripts under Unix. Probably derived from shell bang under the influence of American slang the whole shebang (everything, the works).