Diffs to the Frequently Asked Questions postings

Steve Hayman sahayman at iuvax.cs.indiana.edu
Sat Nov 3 01:59:54 AEST 1990


Note:

    I have decided to post the Frequently Asked Questions list only
    to the newsgroup "comp.unix.questions", and not, as I was earlier
    wondering about, to all non-platform-specific Unix groups.
    The list is, after all, a list of questions and really does
    belong in comp.unix.questions.  Also, other various comp.unix.*
    groups may develop their own FAQ list as time goes by.  I hope this
    list will still be a good reference for readers of all the
    comp.unix.* groups.

    ..Steve


Here are the most recent changes to parts 1 and 2 of the
Frequently Asked Questions articles, which have just been
posted.  You can find the full articles elsewhere in
comp.unix.questions.  You can also ftp the most recent version from
iuvax.cs.indiana.edu (129.79.254.192), where it's
"pub/Unix-Questions.part1" and "pub/Unix-Questions.part2".

*** /tmp/,RCSt1a00944	Fri Nov  2 09:57:06 1990
--- part1	Fri Nov  2 09:52:43 1990
***************
*** 1,19 ****
! Subject: Welcome to comp.unix.questions and comp.unix.wizards [Monthly posting]
  
! [Last changed: $Date: 90/10/01 14:36:34 $ by $Author: sahayman $]
  
! [NOTE - I'm waiting for the fuss over comp.unix.{wizards,internals,esoterica}
!  to settle down.  Until that happens, I'm going to continue to post these
!  two documents to "comp.unix.questions" and "comp.unix.wizards"; you may be
!  reading this in "comp.unix.internals" if someone upstream from you
!  is aliasing ".wizards" to ".internals".    ...Steve Hayman, Oct. 1/1990 ]
! 
! 
! Comp.unix.questions and comp.unix.wizards are two of the most popular
! and highest volume newsgroups on Usenet.  This article is a monthly
! attempt to remind potential posters about what is appropriate for each
! of the two newsgroups.  If you would like to make any suggestions about
! the content of this article, please contact its maintainer at
  sahayman at iuvax.cs.indiana.edu  or  iuvax!sahayman .
  
  A companion article includes the answers to some Frequently
--- 1,13 ----
! Subject: Welcome to comp.unix.questions [Monthly posting]
  
! [Last changed: $Date: 90/11/02 09:52:30 $ by $Author: sahayman $]
  
! 
! Comp.unix.questions is one of the most popular and highest volume
! newsgroups on Usenet.  This article is a monthly attempt to remind
! potential posters about what is appropriate for this newsgroup.
! If you would like to make any suggestions about the
! content of this article, please contact its maintainer at
  sahayman at iuvax.cs.indiana.edu  or  iuvax!sahayman .
  
  A companion article includes the answers to some Frequently
***************
*** 20,25 ****
--- 14,20 ----
  Asked Questions.  You may save yourself a lot of time by reading
  that article before posting a question to the net.
  
+ 
  If you have not already read the overall Usenet introductory material
  posted to "news.announce.newusers", please do.  Much of this article
  overlaps with the common sense guidelines posted there.
***************
*** 54,64 ****
        such books available, and you will save yourself a lot
        of trouble by having one handy and consulting it frequently.
  
! Please remember that comp.unix.questions and comp.unix.wizards are
! read by over 50,000 people around the world, and that posting a question
! to either of these groups will cost a lot of time and money by the
! time your article is distributed to Japan, Australia, Western Europe,
! Israel, and all corners of North America.
  
  Also, some people receive these newsgroups as part of a mailing list
  rather than a newsgroup.  If you're one of these people, please don't
--- 49,58 ----
        such books available, and you will save yourself a lot
        of trouble by having one handy and consulting it frequently.
  
! Please remember that the comp.unix.* newsgroups are read by over 50,000
! people around the world, and that posting a question to this group will
! cost a lot of time and money by the time your article is distributed to
! Japan, Australia, Western Europe, Israel, and all corners of North America.
  
  Also, some people receive these newsgroups as part of a mailing list
  rather than a newsgroup.  If you're one of these people, please don't
***************
*** 71,101 ****
  
  
  
!     Should I Post to "comp.unix.questions" or "comp.unix.wizards" ?
  
! Comp.unix.wizards is intended for advanced discussion of Unix features - the
! sort of topics the average user never thinks about.  Simple questions
! about using normal commands should never go there.  Unfortunately, it's
! often hard to tell whether your question is simple until you know
! what the answer is.  A good rule of thumb is -
! 
!     Don't post to comp.unix.wizards unless *you* *yourself* are
!     a Unix wizard.
! 
! Don't post to comp.unix.wizards just because you want to get the
! attention of a unix wizard.  Many unix wizards read comp.unix.questions
! also and will be happy to help you out if they see your question there.
! 
! Some other newsgroups may be more appropriate than either of
! comp.unix.questions or comp.unix.wizards.  These include:
! 
!     comp.lang.c		General discussion of the C language
! 			(comp.lang.c has its own "Frequently Asked Questions"
! 			 list - be sure to check it out before posting a
! 			 question to that group.)
!     comp.std.c		Discussion of the ANSI/ISO C standard
!     comp.std.unix	Discussion of Unix standards and particularly
! 			the IEEE 1003 POSIX standard.
  
  	      What Information Should I Include?
  
--- 65,108 ----
  
  
  
!                To Which Newsgroup Should I Post My Question?
! 
  
! The choice of newsgroup is harder than it used to be.  In the old days,
! you just had to choose between "comp.unix.questions" and
! "comp.unix.wizards".  The latter group has been subdivided into several
! specific groups.   Choose one of the following groups carefully.  If
! you aren't sure where your question belongs or if your question is not
! specific to some particular version of Unix, try "comp.unix.questions".
! Many knowledgeable Unix wizards read that group and will be able
! to help you.
! 
! Here are the capsule descriptions of various groups you might consider
! (extracted from a monthly posting to "news.announce.newusers")
! 
! comp.unix.questions     UNIX neophytes group.
! 			If your question isn't a really good match for one of
! 			the groups below, post it here.
! 
! comp.lang.c             Discussion about C.
! 
! comp.sources.unix       Postings of complete, UNIX-oriented sources. (Moderated)
! comp.std.unix           Discussion for the P1003 committee on UNIX. (Moderated)
! comp.unix               Discussion of UNIX* features and bugs. (Moderated)
! comp.unix.admin         Administering a Unix-based system.
! comp.unix.aix           IBM's version of UNIX.
! comp.unix.aux           The version of UNIX for Apple Macintosh II computers.
! comp.unix.internals     Discussions on hacking UNIX internals.
! comp.unix.large         UNIX on mainframes and in large networks.
! comp.unix.misc          Various topics that don't fit other groups.
! comp.unix.msdos         MS-DOS running under UNIX by whatever means.
! comp.unix.programmer    Q&A for people programming under Unix.
! comp.unix.shell         Using and programming the Unix shell.
! comp.unix.sysv286       UNIX System V (not XENIX) on the '286.
! comp.unix.sysv386       Versions of Unix (not Xenix) on Intel 80386-based boxes.
! comp.unix.ultrix        Discussions about DEC's Ultrix.
! comp.unix.xenix.misc    General discussions regarding XENIX (except SCO).
! comp.unix.xenix.sco     XENIX versions from the Santa Cruz Operation.
  
  	      What Information Should I Include?
  
*** /tmp/,RCSt1a00965	Fri Nov  2 09:57:13 1990
--- part2	Fri Nov  2 09:54:34 1990
***************
*** 1,15 ****
  Subject: Frequently Asked Questions about Unix - with Answers [Monthly posting]
  
! [Last changed: $Date: 90/10/01 14:36:47 $ by $Author: sahayman $]
  
  This article contains the answers to some Frequently Asked Questions
! often seen in comp.unix.questions and comp.unix.wizards.  Please don't
! ask these questions again, they've been answered plenty of times
! already - and please don't flame someone just because they may not have
! read this particular posting.  Thank you.
  
- This article includes answers to:
  
  
  	1)  How do I remove a file whose name begins with a "-" ?
  	2)  How do I remove a file with funny characters in the filename ?
--- 1,15 ----
  Subject: Frequently Asked Questions about Unix - with Answers [Monthly posting]
  
! [Last changed: $Date: 90/11/02 09:52:46 $ by $Author: sahayman $]
  
  This article contains the answers to some Frequently Asked Questions
! often seen in comp.unix.questions.  Please don't ask these questions
! again, they've been answered plenty of times already - and please don't
! flame someone just because they may not have read this particular
! posting.  Thank you.
  
  
+ This article includes answers to:
  
  	1)  How do I remove a file whose name begins with a "-" ?
  	2)  How do I remove a file with funny characters in the filename ?
***************
*** 421,427 ****
  	Korn Shell:
  	    typeset -l l
  	    for f in *; do
! 		l=f
  		mv $f $l
  	    done
  
--- 421,427 ----
  	Korn Shell:
  	    typeset -l l
  	    for f in *; do
! 		l="$f"
  		mv $f $l
  	    done
  
***************
*** 835,840 ****
--- 835,844 ----
      There should be no difference in content between the
      mailing list and the newsgroup.   
  
+ 	[Note: The newsgroup "comp.unix.questions" was recently
+ 	deleted, but the "Unix-Wizards" mailing list still exists.
+ 	I'm not really sure how this is all going to sort itself out.]
+ 
      To get on or off either of these lists, send mail to
      Info-Unix-Request at brl.mil or Unix-Wizards-Request at brl.mil .
      Be sure to use the '-Request'.  Don't expect an immediate response.
***************
*** 997,1035 ****
      
  24) How do I tell inside .cshrc if I'm a login shell?
  
!     Here's one way, courtesy of Maarten Litmaath:
  
!     # .cshrc
! 
!     if (! $?CSHLEVEL) then
!             setenv      CSHLEVEL        0
!             set home = ~username        # just to be sure
!             source ~/.env               # environment stuff we always want
!     else
!             set tmp = $CSHLEVEL
!             @ tmp++
!             setenv      CSHLEVEL        $tmp
!     endif
! 
!     # exit from .cshrc if not interactive, e.g. under rsh (BSD)
!     if (! $?prompt) exit
! 
!     # aliases
!     # set variables
! 
!     ----------------------------------------
! 
!     # .env
! 
!     # umask
!     # setenv variables
! 
!     ----------------------------------------
! 
!     # .login
  
!     # terminal setup
!     # startup favourite window environment
  
  25) Why doesn't redirecting a loop work as intended?  (Bourne shell)
  
--- 1001,1047 ----
      
  24) How do I tell inside .cshrc if I'm a login shell?
  
!     When people ask this, they usually mean either
  
! 	How can I tell if it's an interactive shell?
!     or
! 	How can I tell if it's a top-level shell?
! 	
!     You could perhaps determine if your shell truly is a login shell
!     (i.e. is going to source ".login" after it is done with ".cshrc")
!     by fooling around with "ps" and "$$"; if you're really interested
!     in the other two questions, here's one way you can organize
!     your .cshrc to find out.
! 
! 
! 	if (! $?CSHLEVEL) then
! 		#
! 		# This is a "top-level" shell,
! 		# perhaps a login shell, perhaps a shell started up by
! 		# 'rsh machine some-command'
! 		# This is where we should set PATH and anything else we
! 		# want to apply to every one of our shells.
! 		#
! 		setenv      CSHLEVEL        0
! 		set home = ~username        # just to be sure
! 		source ~/.env               # environment stuff we always want
! 	else
! 		# 
! 		# This shell is a child of one of our other shells so
! 		# we don't need to set all the environment variables again.
! 		#
! 		set tmp = $CSHLEVEL
! 		@ tmp++
! 		setenv      CSHLEVEL        $tmp
! 	endif
! 
! 	# Exit from .cshrc if not interactive, e.g. under rsh 
! 	if (! $?prompt) exit
! 
! 	# Here we could set the prompt or aliases that would be useful
! 	# for interactive shells only.
  
! 	source ~/.aliases
  
  25) Why doesn't redirecting a loop work as intended?  (Bourne shell)
  
***************
*** 1057,1064 ****
      forbids the behaviour described above, i.e. in P1003.2 conformant
      Bourne shells the example will print ``foo is now: bletch''.
  
!     Take the next example:
  
  	foo=bar
  
  	echo bletch | read foo
--- 1069,1099 ----
      forbids the behaviour described above, i.e. in P1003.2 conformant
      Bourne shells the example will print ``foo is now: bletch''.
  
!     In historic (and P1003.2 conformant) implementations you can use the
!     following `trick' to get around the redirection problem:
! 
! 	foo=bar
! 
! 	# make file descriptor 9 a duplicate of file descriptor 0 (stdin);
! 	# then connect stdin to /etc/passwd; the original stdin is now
! 	# `remembered' in file descriptor 9; see dup(2) and sh(1)
! 	exec 9<&0 < /etc/passwd
! 
! 	while read line
! 	do
! 		# do something with $line
! 		foo=bletch
! 	done
! 
! 	# make stdin a duplicate of file descriptor 9, i.e. reconnect it to
! 	# the original stdin; then close file descriptor 9
! 	exec 0<&9 9<&-
  
+ 	echo "foo is now: $foo"
+ 
+     This should always print ``foo is now: bletch''.
+     Right, take the next example:
+ 
  	foo=bar
  
  	echo bletch | read foo
***************
*** 1072,1078 ****
      made an exception: if it is a builtin command like ``read'', the current
      shell will execute it, else another subshell is created.
  
!     Draft 9 of POSIX 1003.2 allows both behaviours; future drafts may
      explicitly specify only one of them though.
  
  26) How do I use popen() to open a process for reading AND writing?
--- 1107,1113 ----
      made an exception: if it is a builtin command like ``read'', the current
      shell will execute it, else another subshell is created.
  
!     Draft 10 of POSIX 1003.2 allows both behaviours; future drafts may
      explicitly specify only one of them though.
  
  26) How do I use popen() to open a process for reading AND writing?
***************
*** 1085,1090 ****
--- 1120,1126 ----
      for a popen()-like library function.
  
  27) How do I pronounce "vi" , or "!", or "/*", or ...?
+ 
      You can start a very long and pointless discussion by wondering
      about this topic on the net.  Some people say "vye", some say
      "vee-eye" (the vi manual suggests this) and some Roman numerologists
***************
*** 1103,1109 ****
  
  			The Pronunciation Guide
  			-----------------------
! 			      version 2.3
  
  Names derived from UNIX are marked with *, names derived from C are marked
  with +, names derived from (Net)Hack are marked with & and names deserving
--- 1139,1145 ----
  
  			The Pronunciation Guide
  			-----------------------
! 			      version 2.4
  
  Names derived from UNIX are marked with *, names derived from C are marked
  with +, names derived from (Net)Hack are marked with & and names deserving
***************
*** 1165,1176 ****
  
  ;    SEMICOLON, semi, hybrid, giant eel&, go-on#
  
! <>   ANGLE BRACKETS, angles, funnels, brokets, pointy brackets
  <    LESS THAN,    less, read from*, from*,        in*,  comesfrom*, crunch,
! 	sucks, left chevron#, open pointy (brack[et]), bra#, upstairs&, west
  >    GREATER THAN, more, write to*,  into/toward*, out*, gazinta*,   zap,
  	blows, right chevron#, closing pointy (brack[et]), ket#, downstairs&,
! 	east
  
  =    EQUAL SIGN, equal(s), gets, becomes, quadrathorpe#, half-mesh, ring&
  
--- 1201,1213 ----
  
  ;    SEMICOLON, semi, hybrid, giant eel&, go-on#
  
! <>   ANGLE BRACKETS, angles, funnels, brokets, pointy brackets, widgets
  <    LESS THAN,    less, read from*, from*,        in*,  comesfrom*, crunch,
! 	sucks, left chevron#, open pointy (brack[et]), bra#, upstairs&, west,
! 	(left|open) widget
  >    GREATER THAN, more, write to*,  into/toward*, out*, gazinta*,   zap,
  	blows, right chevron#, closing pointy (brack[et]), ket#, downstairs&,
! 	east, (right|close) widget
  
  =    EQUAL SIGN, equal(s), gets, becomes, quadrathorpe#, half-mesh, ring&
  
***************
*** 1314,1319 ****
--- 1351,1357 ----
  | broken line	EBCDIC has two vertical bars, one solid and one broken.
  ~ enyay		from the Spanish n-tilde
  () nil		LISP
+ 
  -- 
  Steve Hayman    Workstation Manager    Computer Science Department   Indiana U.
  sahayman at iuvax.cs.indiana.edu                                    (812) 855-6984



More information about the Comp.unix.questions mailing list