Rosetta Code:Village Pump/Bash examples: Difference between revisions

('''tsch'''! Don't '''dash''' and '''bash'''. Opening a can of bu'''csh'''? '''psh'''! '''sh'''h! People are trying to sleep.)
(Applied Template:vptopic)
 
(4 intermediate revisions by 3 users not shown)
Line 1:
{{Vptopic
|topic=Bash examples
|summary=Discussion of various shell types
}}
If you wish to insert a Bash examples, do not add it with a title "Bash" but rather with a title "UNIX Shell" which is more generic, and add a comment about the kind of shell the example is written with. See [[Date_format#UNIX_Shell|this page]] to see an example.
: Does anyone feel up to creating a GeSHi language file for bash? "man bash" on most Linux boxes should give you a complete listing of all of the keywords and special vars. --[[User:Short Circuit|Short Circuit]] 16:54, 11 February 2009 (UTC)
Line 8 ⟶ 12:
<lang bash>#!/bin/sh</lang>
::::::at the beginning, indicating to the system they wanted a POSIX shell. That edition of Ubuntu had /bin/sh symlinked to '''dash''', which is a ''strictly'' POSIX shell. And it turned out part of their build script depended on '''bash''' extensions. Symlinking /bin/sh to /bin/bash fixed most of the problems. However, the '''csh''' lang ID idea is good...is '''tcsh''' the same? And what do we do for '''psh''' and friends? --[[User:Short Circuit|Short Circuit]] 06:34, 13 February 2009 (UTC)
::::::: ... [[wp:Almquist_shell|Interesting]] and creating confusion... but from a syntax-HLing point of view, it is not a problem, I believe a bash-syntax-HLer highlights well also ash/dash/sh; handling them as aliases? --[[User:ShinTakezou|ShinTakezou]] 14:45, 13 February 2009 (UTC)
:::::::: The question is whether or not it's appropriate for the highlighter to imply support for keywords and other functionality that aren't in the language being highlighted. --[[User:Short Circuit|Short Circuit]] 16:08, 13 February 2009 (UTC)
::::::: Back to the question about lumping '''tcsh''' with '''csh'''. Was anything ever decided about this? IIRC, almost all the differences between the two were in interactive behavior. I don't think I've ever written a '''csh''' script that had to be modified to run in '''tcsh'''. It seems to me that it would be considerably safer to put '''csh''' and '''tcsh''' together than to put the POSIX umbrella shells together. --[[User:Balrog|Balrog]] 00:24, 28 May 28 2009 (UTC)