It is currently Fri, 15 Oct 2021 20:50:34 GMT



 
Author Message
 Can /bin/csh be replaced with /bin/tcsh?
In article <1991Sep17.223724.9...@pony.acadiau.ca> pe...@pony.acadiau.ca (Peter  

Here's an even simpler question: what are the ramifications of typing

        rm /bin/csh

??

I once had the opportunity to do this. It was a small Sun system that was
not being used to support users (just daemons listening over the net).

Typing that command (and rm /usr/ucb/vi and all the hard links to it) was
easily the most fun I had that week. :-)
--
Byron Rakitzis
by...@archone.tamu.edu



 Sun, 06 Mar 1994 23:38:51 GMT   
 Can /bin/csh be replaced with /bin/tcsh?

Unfortunately, one of them is that some perl scripts will break because perl
uses csh to glob.  I'd like some answers to the original question,
because it's *very* tempting to replace /bin/csh on most older
system V's and enhanced system III's because of the broken && vs || problem
and the lack of eval in the old csh.

Another question: has anyone figured out if it's possible to compile
tcsh without the 't' from the tcsh sources ?
--
Ronald Khoo <ron...@robobar.co.uk> +44 81 991 1142 (O) +44 71 229 7741 (H)



 Mon, 07 Mar 1994 05:52:12 GMT   
 Can /bin/csh be replaced with /bin/tcsh?
From the keyboard of ron...@robobar.co.uk (Ronald S H Khoo):
:
:> Here's an even simpler question: what are the ramifications of typing
:>
:>   rm /bin/csh
:>
:> ??
:
:Unfortunately, one of them is that some perl scripts will break because perl
:uses csh to glob.  

If there's no /bin/csh, it uses /bin/sh.  Only scripts doing things like

    @x = <{foo,bar,baz}{alpha,beta,gamma}>;

would break, and those scripts were doing something they really
shouldn't have been anyway, attractive though it appears.

:I'd like some answers to the original question,

I've actually got tcsh running as csh on my systems.  Everyone's
csh scripts still work, and since we never had completion before
this, they're happy to hit TAB and never reach for ESC.  There
are some binding issues: tcsh doesn't respect your stty settings,
nor does it let you change them with stty.  These are annoying.

--tom



 Mon, 07 Mar 1994 21:33:53 GMT   
 Can /bin/csh be replaced with /bin/tcsh?
[ two separate threads here, please followup as appropriate ]

But that's a *compile time* option.  Sure, if I remove csh *before* I configure
perl, that's OK, but I was answering Byron's question from the "literal"
viewpoint, viz: what would be the ramifications of doing

        /bin/rm /bin/csh

*now*.  Well, perl's globs would suddenly become very empty until I
recompiled it.  I'm not one for putting globbing code into perl itself,
and I'm not happy with globbers written in perl -- because I'm on a slow
machine, and startup time is bad enough as it is (dump only makes things
*worse* because my disc subsystem is worse than my CPU -- guess what,
I'm on a pee cee :-( ) so I personally *like* the idea of having a
separate globbing program.

It's just inconvenient that the best available globber happens to be /bin/csh.
Bring back /etc/glob, all is forgiven.  H'm.  If we take glob(3) out of
tcsh, and build a glob(1) out of it, and made perl use that, wouldn't that
make perl *better* ?  At least the globbing patterns would be consistent
across platforms, and I view that as quite an important plus.

Oh good.  So it works :-)

I'm not bothered about differences in the flashy stuff.

This is indeed a serious drawback.

--
Ronald Khoo <ron...@robobar.co.uk> +44 81 991 1142 (O) +44 71 229 7741 (H)



 Tue, 08 Mar 1994 17:28:18 GMT   
 Can /bin/csh be replaced with /bin/tcsh?
In article <1991Sep20.092818.9...@robobar.co.uk> ron...@robobar.co.uk (Ronald S H Khoo) writes:

Well the glob(3) distributed by tcsh is the 4.4BSD glob(3) plus an addition
to handle ^regexp. The problem with that is that glob(3) does not handle
{} and ~.

This is fixed in 6.00.03 which is due out in 2-3 weeks.

christos
--
Christos Zoulas         | 389 Theory Center, Electrical Engineering,
chris...@ee.cornell.edu | Cornell University, Ithaca NY 14853.
chris...@crnlee.bitnet  | Phone: (607) 255 0302, Fax: (607) 255 9072



 Wed, 09 Mar 1994 18:18:49 GMT   
 Can /bin/csh be replaced with /bin/tcsh?
In <1991Sep20.092818.9...@robobar.co.uk> ron...@robobar.co.uk (Ronald S H Khoo) writes:
| It's just inconvenient that the best available globber happens to be /bin/csh.
| Bring back /etc/glob, all is forgiven.  H'm.  If we take glob(3) out of
| tcsh, and build a glob(1) out of it, and made perl use that, wouldn't that
| make perl *better* ?  At least the globbing patterns would be consistent
| across platforms, and I view that as quite an important plus.

Shades of Unix V6!  /etc/glob was a seperate program in those days
of 64K total per program (on machines like the 11/60 that didn't have
split I & D), and was exec'ed (and read from via a pipe, if I recall right)
by /bin/sh for expansion of wildcards, etc.

Oh well, nothing new under the sun.  And yes, there were other programs
and scripts that came to rely on it, and they had* to be fixed when we
went to V7.

* Well, they didn't *have* to be, we could have made a shell script out of
/etc/glob, or just ported the V6 version, but there weren't that many
programs that needed glob, and there was a lot of other code that needed
to be fixed for that transition, so we cleaned those up along with everything
else.
--

     Dave Olson
----============----
Life would be so much easier if we could just look at the source code.



 Sun, 13 Mar 1994 09:59:13 GMT   
 Can /bin/csh be replaced with /bin/tcsh?
In article <1991Sep20.092818.9...@robobar.co.uk> ron...@robobar.co.uk (Ronald S H Khoo) writes:

Why not?
--
-- Peter da Silva
-- Ferranti International Controls Corporation
-- Sugar Land, TX  77487-5012;  +1 713 274 5180
-- "Have you hugged your wolf today?"



 Sun, 13 Mar 1994 05:59:52 GMT   
 Can /bin/csh be replaced with /bin/tcsh?
ron...@robobar.co.uk (Ronald S H Khoo) writes:

If someone does this, could we please use a different set of meta characters,
ones that are not special to the shell in addition to the normal ones?  It
would be so nice if I could say

        @cfiles = `glob =.c`;

instead of

        @cfiles = `glob \*.c`;

or worse:

        @cfiles = `glob '*.c'`;

All that quoting makes my head spin like a top.  I'm quite happy if you
make the non-globbibng globbibg chars conditional on an option
like so

        @cfiles = `glob -for_larry =.c`;

I'll even write it if you like.
---
Larry McVoy                     (415) 336-7627                   l...@sun.com



 Sun, 13 Mar 1994 05:00:59 GMT   
 Can /bin/csh be replaced with /bin/tcsh?
pe...@ficc.ferranti.com (Peter da Silva) asks:

2 reasons:

        a) bloat
        b) I'd *really* *really* *really* like glob patterns to be
           consistent between programs.

So, yes, I would prefer that all shells used /etc/glob, like in the old days
when I was still in school :-)  For the purpose of this discussion, perl is
a shell....

I disagree with Tom Christiansen that doing this would be slow, it's not
any different from now -- since perl simply uses csh exactly as /etc/glob
is used.  On some systems csh is faster because some people may already be
using it, on my system glob would be faster because it'd be much smaller.
The actual difference is probably minimal.

I'm not advocating a change in perl syntax,  I'm just suggesting that
rather than behaving differently depending on the availability of csh,
simply to distribute a tiny /etc/glob and use that -- minimal change, and
we win because the portability of glob patterns between csh's improves.
--
Ronald Khoo <ron...@robobar.co.uk> +44 81 991 1142 (O) +44 71 229 7741 (H)



 Sun, 13 Mar 1994 19:37:17 GMT   
 Can /bin/csh be replaced with /bin/tcsh?
In article <1991Sep25.113717.24...@robobar.co.uk> ron...@robobar.co.uk (Ronald S H Khoo) writes:

In *perl*? You're worried about a little bit more bloat in *perl*?

Bit late for that. Personally, I'd like to replace the CSH {,,,}
kludge with a *real* alternation operator (how about ^?), so you
could glob "{alpha^beta^gamma}*.{c^h}" and get "alpha7.c gamma.h"
instead of "No match". (Yes, I know you could do the "{c^h}" bit
with "[ch]", but charsets are simply a degenerate case of alternation.

The Amiga wildcard syntax beats the UNIX one out here: not only does
it have real alternation it has real closures as well.

If all shells used /etc/glob, I'd agree. Since they don't, why do you
want to slow down globbing in perl?

Sounds like a nifty idea. I'd like it. What would the output be? Null
separated strings sounds good to me, since it'd avoid problems with
pathologically weird file names.

Provide a compatible glob(3) call for those of us who want to use it in
C programs where the overhead of execing becomes significant.
--
-- Peter da Silva
-- Ferranti International Controls Corporation
-- Sugar Land, TX  77487-5012;  +1 713 274 5180
-- "Have you hugged your wolf today?"



 Wed, 16 Mar 1994 02:00:49 GMT   
 Can /bin/csh be replaced with /bin/tcsh?
(plug warning)

pe...@ficc.ferranti.com (Peter da Silva) wrote:

The syntax I use in zsh is (alpha|beta|gamma)*.(c|h), or simply
(alpha|beta|gamma)*.[ch].  The lexer is smart enough to know that the '|'
does not mean pipe.

Agreed, which is why I put it in zsh.  One change I made is that the
closure character, '#', goes afterwards, where it belongs:

% ls [a-z]#
errs     gensyms   symbols   zmath
% ls (*/)#*.c
foo.c    letters/highscore.c    src/cs320/8/main.c    etc.

--
Paul Falstad                     | 10 PRINT "PRINCETON CS"
pfals...@phoenix.princeton.edu   | 20 GOTO 10



 Wed, 16 Mar 1994 05:58:42 GMT   
 Can /bin/csh be replaced with /bin/tcsh?
pe...@ficc.ferranti.com (Peter da Silva) writes:

Yes.  It's bad enough as it is -- takes 8 seconds to load on my XENIX 286
box, plus 30 seconds more before it's compiled anything useful.
Every little bit counts.  But I do agree that worrying about bloat
in perl is a bit like worrying about the sea being wet :-)

I don't particularly.  It'd be *faster* to use /etc/glob on my SCO UNIX
box.  Remember, perl currently does its globbing by starting a csh.
Starting a glob on my machine would be faster.  Slower on Tom's machine
of course, because he already has a csh running, but I don't.

Exactly the same as the csh builtin "glob" command of course.  Yes, that
does produce null separated strings.  I'm not old enough to remember V6,
is that what V6 /etc/glob did ?  Presumably so, since csh is descended
from the V6 /bin/sh ?
--
Ronald Khoo <ron...@robobar.co.uk> +44 81 991 1142 (O) +44 71 229 7741 (H)



 Wed, 16 Mar 1994 18:48:54 GMT   
 Can /bin/csh be replaced with /bin/tcsh?
In article <7...@appserv.Eng.Sun.COM> l...@slovax.Eng.Sun.COM (Larry McVoy)
writes:

Aggh, no.  Don't we have enough trouble with different programs using
different standards.  Not another one.  What's so bad about that last version ?

Rob
--
UUCP:   ...!mcsun!ukc!warwick!cudcv     PHONE:  +44 203 523037
JANET:  cu...@uk.ac.warwick             INET:   cu...@warwick.ac.uk
Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England



 Thu, 17 Mar 1994 00:09:31 GMT   
 Can /bin/csh be replaced with /bin/tcsh?

hah!

Problematical, but reasonable. How about making it an option so when
my fingers are running Amiga microcode and I type "rm #?.o" it'll work?

(next problem is getting zsh if your not on a BSD system)
--
-- Peter da Silva
-- Ferranti International Controls Corporation
-- Sugar Land, TX  77487-5012;  +1 713 274 5180
-- "Have you hugged your wolf today?"



 Sat, 19 Mar 1994 04:00:03 GMT   
 
   [ 14 post ] 

Similar Threads

1. /bin/tcsh vs /usr/local/bin/tcsh

2. executing /bin/sh script in a /bin/csh login

3. executing /bin/sh script in a /bin/csh login #2

4. pwd not in csh/tcsh, coding /bin/pwd ?

5. /bin /usr/bin /usr/local/bin etc

6. /cgi-bin/phf /cgi-bin/test-cgi /cgi-bin/handler

7. /usr/bin, /usr/local/bin, /sbin or /opt/bin, /var/opt/bin - I'm confused.

8. #!/bin/tcsh vs. #! /bin/tcsh

9. #!/bin/tcsh vs. #! /bin/tcsh

10. /bin/ls and /bin/echo * same or not?


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software