[loulug] Re: font/script help

  • From: "DJ polstee" <djpolstee@xxxxxxxxx>
  • To: loulug@xxxxxxxxxxxxx
  • Date: Sat, 19 May 2007 23:21:42 -0500

What about doing

echo "$DISP" | $OSD "$OSD_OPTS"  ?



On 5/18/07, Jared Breland <jbreland@xxxxxxxxxxx> wrote:

I'm writing a script that calls a program and specifies a specific font
for
that program to use.  If I run this command directly from the command
prompt, it works:

echo "test" | osd_cat -p bottom -A center -i -800 -o 6 -f
-bitstream-bitstream\ vera\ sans-bold-*-*-*-30-*-*-*-*-*-*-* -c green -d 3
-S 2

Notice the \'s escaping the the spaces in the font name.  I want to run
the
same command from a script using variables.  If I do this, however, it
fails.

DISP=$1
OSD='osd_cat'
OSD_OPTS='-p bottom -A center -i -800 -o 6 -f -bitstream-bitstream\ vera\
sans-bold-*-*-*-30-*-*-*-*-*-*-* -c green -d 3 -S 2'
echo "$DISP" | $OSD $OSD_OPTS

Specifically, I get this error message:

$ xbinddisp.sh test
Unable to open: vera\

Probably not coincidently, I get the same error message if I run the
command
directly from the command prompt again WITHOUT the \'s.  I tried no \,
single \, and double \ within the script, but nothing seems to work.

Any suggestions?

--
Jared Breland
jbreland@xxxxxxxxxxx
http://www.legroom.net/



Other related posts: