[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bash crash
From: |
Greg Wooledge |
Subject: |
Re: Bash crash |
Date: |
Thu, 22 Oct 2015 08:33:07 -0400 |
User-agent: |
Mutt/1.4.2.3i |
On Thu, Oct 22, 2015 at 02:39:43AM +0000, Kai Wang X wrote:
> The process named "com" launched by script command "com.sh start". Pls refer
> to the attached files. It looks easy, doesn't it?
It looks like a horrible mish-mash of legacy Bourne shell syntax,
edited later by another person using certain post-Bourne shell constructs
(note the inconsistent use of test and [ commands), with quoting failures
thrown in for good measure (lots of [ -e ${foo} ] commands).
I cringed at the `expr` all over the place, and stopped reading halfway
through.
The shebang is #!/bin/sh and it's using half-Bourne half-POSIX code, so
if you suspect a bug in bash, why not just let it run under some other
shell? /bin/sh does not link to bash on most operating systems. Not
even on all of the Linux-based operating systems.
- Bash crash, Kai Wang X, 2015/10/20
- Re: Bash crash, Chet Ramey, 2015/10/20
- RE: Bash crash, Kai Wang X, 2015/10/20
- Re: Bash crash, Chet Ramey, 2015/10/21
- Message not available
- RE: Bash crash, Kai Wang X, 2015/10/21
- Re: Bash crash,
Greg Wooledge <=
- Re: Bash crash, Piotr Grzybowski, 2015/10/22
- RE: Bash crash, Kai Wang X, 2015/10/23
- Re: Bash crash, Piotr Grzybowski, 2015/10/23
- RE: Bash crash, Kai Wang X, 2015/10/23
- Re: Bash crash, Piotr Grzybowski, 2015/10/23
Message not available