Mailinglist Archive: opensuse (1355 mails)

< Previous Next >
Re: [opensuse] Baffled by shell script
On 06/23/2018 08:10 PM, Joseph Comfort wrote:
#!/bin/sh
# Script for EDT look-alike ED v1.5.9

eddsk=/usr/local/ED-159

$eddsk/edc $eddsk/vt200.ed $eddsk/ed.setup 0 0 -1 -u $1 $2 $3 $4 $5 $6 $7

FWIW: this is pretty poor variable quoting style - actually there's no quoting
at all.
This might work in some of your cases ... but to have a more robust script,
please
do yourself and everyone else a favor and use:

"$eddsk/edc" "$eddsk/vt200.ed" "$eddsk/ed.setup" 0 0 -1 -u "$1" "$2" "$3"
"$4" "$5" "$6" "$7"

or probably even more simply:

"$eddsk/edc" "$eddsk/vt200.ed" "$eddsk/ed.setup" 0 0 -1 -u "$@"

Have a nice day,
Berny

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References