Le 11.06.2014 14:42, Floris a écrit :
If someone have any tips, tricks or commands on the shell script. I
love to hear them.
if [ "$(dpkg --print-architecture)" = "amd64" -a "$(dpkg
--print-foreign-architectures)" != "i386" ]; then
This syntax "$(command)" is not portable.
If you want to write portable scripts, and I guess so since you used
"#!/bin/sh", you want the "`command`" syntax.
Otherwise, you want to use "#!/bin/bash".
Other than that, but it is only a coding style potential issue, I would
say that mixing "test -foo ... " and "[ -foo ... ]" is quite confusing.
I do not have anything else to say, I am a newbie when things comes to
shell scripting. Except than sorry to reply so late, I let my mailbox
filling a lot so noticing mails on threads I have participated is not
easy. Not enough time.
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive:
https://lists.debian.org/c4dd40e53160604bd7f059c3f54bf...@neutralite.org