It is currently Mon, 27 Jun 2022 11:28:40 GMT

Author Message
 make sh-script compatible between SUN-sh and bash

Hello everyone,

we are plotting posters of our scientific research using GLE
which has a minor bug in the postscript output, i'm trying
to fix this, with a little shell-script.

i'd like that to run with solaris and linux since we are
working within a SUN-NIS-cluster with some linux-pc's

the problem is in the second line if...
in SUN-OS i have to escape the \&\& to make it work,
despite of using bash which only works with &&

Is there any possibility to fix this?

thanx & solong, gtr

if [ -f $1 ] \&\& [ $1 ] && [ $2 ]; then
awk '
$1=="%%BoundingBox:" {x=$4+2; y=$5+2}
{if (($1=="%%EndComments")&&(NR<20)) {print"2 dict dup /PageSize ["x"
"y"] put\
{if (($1=="/umatrix")&&(NR<20)) {print "2 2 translate"}}
' $1 > $2
exit 0
echo $0": This Script is for fixing the GLE-Poster-Scaling bug"
echo $0": usage: "$0" gle_eps_inputfile.eps gle_eps_putputfile.eps"
exit 1

 Wed, 02 Aug 2000 03:00:00 GMT   
   [ 1 post ] 

Similar Threads

1. script breaks: how compatible bash is with sh/ksh

2. script breaks: how compatible bash is with sh/ksh

3. Making a cd with

4. bash is really compatible with sh ?

5. Execute a sh script under perl and sh: sh script; perl script?

6. Making a Tomcat script (.sh) run during Linux Init

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software