[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [SOLVED] Re: wine-unstable 64 bit



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.


Reply to: