... evidently even bash has different subflavours, with the standard fff
with
[[ "$TARGET_MACHINE" = "Linux" ] && [ "$FLUFOR" = "g77" ]]
pceet030:flutil > ./fff usbrea.f
usbrea:
lnnbln:
we get no error/warning, while with
[ "$TARGET_MACHINE" = "Linux" ] && [ "$FLUFOR" = "g77" ]
pceet030:flutil > ./fff usbrea.f
./fff: line 119: [: missing `]'
usbrea:
lnnbln:
we get an error/warning. BTW:
ls -l /bin/sh
lrwxrwxrwx. 1 root root 4 Jan 17 09:27 /bin/sh -> bash*
I do not know what to say else!
Alfredo
+----------------------------------------------------------------------+
| Alfredo Ferrari || Tel.: +41.22.76.76119 |
| CERN-EN/STI || Fax.: +41.22.76.69474 |
| 1211 Geneva 23 || e-mail: Alfredo.Ferrari_at_cern.ch |
| Switzerland || |
+----------------------------------------------------------------------+
On Fri, 22 Mar 2019, Serban Udrea wrote:
> On 3/22/19 10:05 AM, Alfredo Ferrari wrote:
>> Dear Angel
>>
>> that solution works only on the distribution you are using (Ubuntu with
>> dash as default shell?). It would give an error on all other Linux
>> distributions based on bash...
>
> Hello everybody,
>
> I dare to disagree. I'm using bash and get:
>
> [[ "$TARGET_MACHINE" = "Linux" ] && [ "$FLUFOR" = "g77" ]]
> bash: syntax error in conditional expression
> bash: syntax error near `]'
>
> but
>
> [ "$TARGET_MACHINE" = "Linux" ] && [ "$FLUFOR" = "g77" ]
>
> works.
>
> Another variation that works is:
>
> [ "$TARGET_MACHINE" = "Linux" -a "$FLUFOR" = "g77" ]
>
> Best regards,
> Serban
>
> --
>
> Dr. Serban Udrea
> Researcher
> p-Linac/p-Bar-Target
>
> Phone: +49 6159 71 3356
> Fax: +49 6159 71 3099
> S.Udrea_at_gsi.de
>
> GSI Helmholtzzentrum für Schwerionenforschung GmbH
> Planckstraße 1, 64291 Darmstadt, Germany, www.gsi.de
>
> Commercial Register / Handelsregister: Amtsgericht Darmstadt, HRB 1528
> Managing Directors / Geschäftsführung:
> Professor Dr. Paolo Giubellino, Ursula Weyrich, Jörg Blaurock
> Chairman of the Supervisory Board / Vorsitzender des GSI-Aufsichtsrats:
> State Secretary / Staatssekretär Dr. Georg Schütte
>
>
__________________________________________________________________________
You can manage unsubscription from this mailing list at
https://www.fluka.org/fluka.php?id=acc_info
Received on Fri Mar 22 2019 - 15:01:21 CET