Re: bash, dash and sh
On Apr 22, 2015, at 9:22 PM, Bob Proulx <email@example.com> wrote:
> jeremy bentham wrote:
>> I am finally abandonning my fifteen-year-old computer and Lenny
>> for a six (?) year old used Gateway 2802 (as a Bad Consumer
>> (tm) I never buy anything new if I can avoid it) and, right now,
>> it has a start at Wheezy on it.
As a consumer running an elderly server with Lenny on it, I too congratulate you -- Wheezy is more fun than Lenny. They fixed a lot of stuff that gave me trouble with Lenny.
>> I have a bunch of scripts
>> (ls -1 ~/bin | wc
>> 138 139 1302)
>> with the first line #!/bin/sh that use bashisms, and the above
>> would be a lot easier than editing each one (of course, maybe
>> just editing each one would be easier than doing this ;-) ).
May I suggest just changing the pointer from Dash back to Bash. You sound like somebody that stays with a release for a while, and this is would be a lot less work than editing all those scripts.
Or maybe editing the top line of them from #!/bin/sh to #!/bin/bash, for the time being.
You'll likely have to do significant editing and debugging eventually. But this way, you could do that at your pleasure and at your own speed.