Article View: comp.mail.mush
Article #520Re: Problem setting headers to output from shell commands
From: Bill Petro
Date: Fri, 21 Sep 1990 22:09
Date: Fri, 21 Sep 1990 22:09
31 lines
1190 bytes
1190 bytes
schaefer@ogicse.ogi.edu (Barton E. Schaefer) writes:
>In article <1990Sep21.091000.11589@ibmpcug.co.uk> dylan@ibmpcug.co.uk (Matthew Farwell) writes:
>The above is as close to generic as it gets at the moment. I posted a
>mush script called "bq" (for backquote) a while ago which does this in
>a slightly more generalized manner, but I don't have a copy handy. You
>could also try:
Here it is:
#!/bin/sh
# bq for mush
#
if [ $# -lt 2 ]
then
echo bq: too few arguments
echo 'usage: bq variable command [args ...]'
fi 1>&2
out=$HOME/.mushbq
var=$1
shift
val=`eval "$@" | tr "\012'" ' "'`
echo set $var = "'$val'" > $out
--
Bill Petro {decwrl,hplabs,ucbvax}!sun!Eng!rock
"UNIX for the sake of the kingdom of heaven" Matthew 19:12
Technical Details
Message-ID:
<142877@sun.Eng.Sun.COM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!sun-barr!newstop!sun!warp.Eng.Sun.COM!rockReferences:
<1990Sep21.091000.11589@ibmpcug.co.uk> <12320@ogicse.ogi.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!sun-barr!newstop!sun!warp.Eng.Sun.COM!rock From: rock@warp.Eng.Sun.COM (Bill Petro) Newsgroups: comp.mail.mush Subject: Re: Problem setting headers to output from shell commands Message-ID: <142877@sun.Eng.Sun.COM> Date: 21 Sep 90 22:09:57 GMT References: <1990Sep21.091000.11589@ibmpcug.co.uk> <12320@ogicse.ogi.edu> Sender: news@sun.Eng.Sun.COM Lines: 31