Gripes about /bin/sh AND /bin/csh

Karl Kleinpaste karl at osu-eddie.UUCP
Fri Jun 6 23:27:04 AEST 1986


In article <931 at uwvax.UUCP> pfeiffer at uwvax.UUCP (Phil Pfeiffer) writes:
>I'm posting this message in reponse to a request from a fellow UW student.
>This comes from a novice Unix user.  Maybe some other people in the
>unix community could prove to me that these gripes are really non-gripes.

I suspect so.

>I'm trying to do some extensive rapid prototyping in shellish right now...
>...First, there's the bit about brain-damaged
>quoting (or, non-quoting) of metacharacters.

If you don't understand the quoting habits of csh (or sh), you haven't
read the manual pages on them - the descriptions are really quite
clear, compared to a lot of UNIX documentation.  Single chars can be
quoted with a backslash; strings can be single-quoted to prevent any
further interpretation; and double-quoted to allow filename
substitution without meta-char substitution.

>I'm sure a lot of you already
>know that the ability to use backquote to expand certain command strings
>just isn't there.

Yes, it is; backquoted command strings are supported by both sh and csh.
If it weren't, I couldn't issue a command like
	ls -l `find . -size +100 -print`
Read the manual.

>'Twould be useful if one could abbreviate commands as
>variables to make one's code more legible, a la lisp.

Aliasing is supported by csh.  Sh does it with plain variables.  Read
the manual.

>That's irritating.  What's really irritating, however, is the inability to
>open and read multiple files from the shell.  I mean, even RSX-11M's CSI has
>this!

Sourcing of other command files is supported by both csh and sh.  Read
the manual.

>The requirement was as follows: ...

After reading what you say you wanted to do (sketchy though it was),
it seems to me you worked at it far too hard.  You're not familiar
with the tools available to you.  RTFM and make sure you know how
sharp your tools are before you pick them up, or you'll find yourself
with cut fingers.

In case you haven't notice the recurring refrain in all of the above
response, it is this:

	Read the manual.
-- 
Karl Kleinpaste



More information about the Comp.unix mailing list