Article View: comp.sys.mac
Article #15496Re: xbin is great, but it could be even better...
From: earleh
Date: Thu, 09 Apr 1987 23:54
Date: Thu, 09 Apr 1987 23:54
35 lines
2008 bytes
2008 bytes
In article <1280@midas.TEK.COM>, herbw@midas.TEK.COM (Herb Weiner) writes:
>
> ...there could be a switch so that xbin would perform a macput
> immediately after converting the file.
>
Try putting the following in your .cshrc...
alias send 'macput `xbin -l \!* |grep macname|tr -d \: |sed s/macname.//|tr \\40 _;xbin \!*`'
alias list 'xbin -l \!* '
Here's the first line again, broken so it fits into the terminal width for
reading:
alias send 'macput `xbin -l \!* |grep macname|\
tr -d \: |sed s/macname.//|tr \\40 _;xbin \!*`'
Invocation: 'send file.hqx'
xbin the file and macput it right away
'list file.hqx'
short summary of what's in it
I don't claim that the first one is the best way to do it, in fact it
probably is not. It's just something I whipped up after reading Herb's
posting. (I did test it, seemed to work.) These both take advantage
of the -l switch in xbin which causes it to read the header from the
binhex file and print it out.
Here is a summary of how it works:
I know what the line containing the Mac file name looks like, so I grep
for it, remove "macname: ", and then convert all blanks to underlines.
The result is the name that the xbined files will have on the host. I
then run xbin, and if everything goes normally, macput gets the correct
file name as argv[1].
Technical Details
Message-ID:
<5982@dartvax.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ucbvax!decvax!dartvax!earlehReferences:
<1280@midas.TEK.COM>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ucbvax!decvax!dartvax!earleh From: earleh@dartvax.UUCP Newsgroups: comp.sys.mac Subject: Re: xbin is great, but it could be even better... Message-ID: <5982@dartvax.UUCP> Date: Thu, 9-Apr-87 18:54:59 EST Article-I.D.: dartvax.5982 Posted: Thu Apr 9 18:54:59 1987 Date-Received: Sat, 11-Apr-87 14:59:21 EST References: <1280@midas.TEK.COM> Organization: Society for the Prevention of Cruelty to Graduate Students Lines: 35 Keywords: xbin, suggestions for improvement Summary: try this...