bashisms and linuxisms in GNOME
- From: Frederic Devernay <devernay istar fr>
- To: "gnome-list gnome orgGNOME" <gnome-list gnome org>
- Cc: martin home-of-linux org
- Subject: bashisms and linuxisms in GNOME
- Date: Tue, 15 Sep 1998 09:57:46 +0200
Quite often, bashisms and linuxisms appear in GNOME...
I think bash, when invoked ans /bin/sh, should follow strictly the
Bourne shell, and not add any "extension", such as in
libgtop/LIBGTOP-VERSION:
LIBGTOP_VERSION_CODE=$(($LIBGTOP_MAJOR_VERSION*1000000+$LIBGTOP_MINOR_VERSION*1000+$LIBGTOP_MICRO_VERSION))
which is bash, ksh, but not Bourne shell, sorry, you'll have to use
"expr":
LIBGTOP_VERSION_CODE=`expr
$LIBGTOP_MAJOR_VERSION*1000000+$LIBGTOP_MINOR_VERSION*1000+$LIBGTOP_MICRO_VERSION`
another one which appears frequently is the "ln -sf" linuxism. The -f
option is not standard, and something like "ln -sf main.html index.html"
should be written "rm -f main.html; ln -s main.html index.html".
I'm sorry not to use a linux system
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]