|
|
Warp <war### [at] tagpovrayorg> wrote:
> jhu <nomail@nomail> wrote:
> > #!/bin/sh
> > echo "P6 1920 1080 255" >> scene.ppm
>
> > for ((i=1; i<=1080; i++))
>
> AFAIK that form of the 'for' directive is a bash extension not available
> in the original sh. Hence that script is basically broken because the first
> line claims it's runnable by using sh.
>
> (In linux systems /bin/sh is just an alias for /bin/bash, which is something
> I cannot comprehend. bash is certain *not* the same thing as sh, and making
> them equal only produces broken sh scripts which assume bash extensions but
> still claim to be runnable using sh. The script above works, but only if if
> /bin/sh is an alias for bash or another shell that supports the extension.
> It won't work in systems where /bin/sh is the true original sh.)
>
> > cat scene_$i.ppm | sed '1,3d' >> scene.ppm
>
> sed '1,3d' scene_$i.ppm >> scene.ppm
>
> --
> - Warp
Never noticed that since I always installed bash everywhere I went. Hehe...
Post a reply to this message
|
|