Subject: Re: running mks toolkit and cygwin on same machine
From: [email-masked]
To: [email-masked]
Date: Tue, 9 Jul 2002 22:02:38 -0700

Tuesday, July 9, 2002, 9:02:25 PM, you wrote:

TB> On Wed, Jul 10, 2002 at 05:40:39AM +0200, Thomas Baker wrote:

TB> Though Cygwin seems to have left MKS in the dust for most
TB> of the functions I am interested in -- vim vs. vi, mutt
TB> vs. mailx, fetchmail vs. something-that-didn't-work-for-me,
TB> procmail vs. nothing -- there are a few commands that I still
TB> use in their MKS versions:

TB>     cpio      - is this out of fashion now, or what?

yes, it is.  the big difference between cpio and tar in ages past was
that cpio could handle devices.  (arguably, complete lists in
configuration management are handled much easier by cpio's stdin
filename input method).  however, gnutar now handles devices just as well.
in addition, gnutar handles major compression techniques internally.
source for gnu cpio (i have used ver. 2.4.2 for years) is readily
available and compiles ootb on cygwin.  it handles all of my ancient
archives from multiple platforms.

TB>     flip      - changes CRLF endings; no equivalent in Cygwin?

easy to do in any shell:  invoke /bin/tr to do the translation
you need.  e.g.  for cr to lf:  cat $file | /bin/tr '\015' '\012'

[for those of you familiar with it, this invocation qualifies for
a Useless Use of cat award.
(http://www.ling.helsinki.fi/~reriksso/unix/award.html).  however,
it generalizes the technique for this example and easily allows for
rapid substitution of other i/o methods.]

TB>     more      - sometimes I do not want the text to disappear from
TB>                 the screen on exit

/bin/more is part of cygwin on my system (current as of 2 hours ago,
full install).

TB>     find/grep - the MKS versions can handle larger numbers of 
TB>                 arguments, though xargs solves the problem in Cygwin

qed.

TB>     rev       - reverse order of characters in a line

in zsh, the following works fine (credit to Bart Schaefer and Steve
Talley):

02-07-09
21:45:11 [551] host:./tmp% a="string"
02-07-09
21:46:08 [552] host:./tmp% eval a\=\( \"\$a\[{$#a..1}\]\" \)
02-07-09
21:46:12 [553] host:./tmp% echo $a
g n i r t s

scowles at earthlink dot net

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/