Bash – $(( )) vs. $[]

Oliver Grawert ogra at ubuntu.com
Tue Dec 4 09:58:31 UTC 2012


hi,
Am Montag, den 03.12.2012, 20:14 +0100 schrieb Johnny Rosenberg:
> Okay, I suspected that. I never use dash anyway, so I guess I'll
> continue to use the bash specific style then. Thanks!
you use dash as soon as a script doesnt run as your user, if you write
shell scripts it is good practice to use POSIX compliant code ...

indeed if its only scripts you run when being logged in so that your
defined user shell is used, there is no prob with writing it for bash
only.

and indeed you can force usage of bash (with all its disadvantages) by
setting
#!/bin/bash 
in your script.

ciao
	oli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20121204/2f2841e2/attachment.sig>


More information about the ubuntu-users mailing list