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

Re: Bashisms...



Daniel Burrows <Daniel_Burrows@brown.edu> writes:

>   There are three different bashisms that I've run into:
> 
>  -> '=' != '==' !  Bash will accept a C-style '==' in 'test' or '[' statements.
[...]
>  -> 'function foo() {' is another bashism; just use 'foo() {'
>  -> The most exotic one: if 'foo' is a script in the current directory (and . is
>    not in the PATH), bash will source it on '. foo'; ash needs '. ./foo'.

Another problem is the {foo,bar} construct. In bash `baz{foo,bar}'
expands to `bazfoo bazbar' while in ash it isn't expanded at all. A
few maintainer scripts use this construct, and I'll file some bugs
tonight if it hasn't been done already.

The packages I've found with this problem are dpkg and sgml-tools.
-- 
#!/usr/bin/perl -w
for$a(0..12){$b[$a]="|"." "x78}for$a(0..78){substr($b[-(sin($a*3.1415/
22)-1)*6.499],$a,1)="*"}$b[6]=~s/ /-/g;print join("\n",@b),"\n";


Reply to: