Subject: Re: PROBLEM WITH FMT
To: Brian Buhrow <email@example.com>
From: Jonathan Marsden <Jonathan@XC.Org>
Date: 02/10/1997 15:13:24
On 10 Feb 1997, Brian Buhrow writes:
> One of our most sophisticated professor/users has this to say
> about the version of fmt we distribute with NetBSD systems. Any
> thoughts on a solution short of installing the GNU fmt on both Sun
> SunOS systems and NetBSD systems and telling users to have at it?
That sounds like a pretty appropriate solution to me, unless you are
rabidly anti-GPL at your site. You'd probably want to allow the older
(and presumably familiar) SunOS parameter format to work as expected.
Perhaps that could be done by hacking on the the GNU fmt so that it
considers -N to be a synonym for -w? Should be a pretty trivial change.
One alternative could be to rename the fmt binary to say
/usr/bin/fmt.orig, and then create a shell or Perl script called
/usr/bin/fmt which checks the parameters and accepts SunOS style
parameters and defaults?
>> I don't think it is an exaggeration to say that this is a nightmare
>> of incompatibility.
I'd say it makes sense to go for one standard way to invoke fmt, in a
mixed SunOS and NetBSD environment. Sure.
>> (and let me point out that neither version of "fmt" has the right
>> line length for formatting narrative evaluations of student work
>> for submission to the SCRIPT system).
If you care more about local use that being compatible with some sort
of worldwide pseudo-'standard', maybe you could fix this while you are
at it, and set the default to be whatever the most common local needed
line length is?
Or encourage your user (especially as he is a sophisticated user!), to
create himself a shell script called fmt that does what he needs, in a
directory say ~/bin that is always first on his path, on all machines
he uses. That way he gets *his* custom 'fmt' by default, and it does
what *he* wants. This is teh most flexibel solution of all, since
each user can then have their *own* set of defaults :-)
As far as I can see, POSIX.2 doesn't describe the fmt command, so no
one set of paramaters to fmt is "officially correct". The GNU version
seems flexible, is free, and comes with source, so I'd probably go for
that if I had to implement a campus-wide "standard" for fmt.
Jonathan Marsden | Internet: firstname.lastname@example.org | Making electronic
1849 N. Wabash Ave.| Phone: +1 (909) 794 1151 | communications work
Redlands, CA 92374 | FAX: +1 (909) 794 3016 | reliably for Christian
USA | http://www.xc.org/jonathan | missions worldwide