[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: The "*" character (was: Latex )



> >It would be helpful if you could tell us what version of the packages
> >you have installed.  For example, if you would run this commands:
> >
> >      dpkg -l *tex*
> 
> I noticed that this doesn't work under tcsh, but does work under
> bash.  Is there a difference between how the * character is treated
> under the two shells?

'*tex*' works with both shells. bash will not replace a clobber pattern with
the empty string if no match is found, tcsh does (AFAIK).

bash(1)
#   Pathname Expansion
#       After word splitting, unless the -f option has  been  set,
#       bash  scans  each word for the characters *, ?, and [.  If
#       one of these characters appears, then the word is regarded
#       as  a  pattern, and replaced with an alphabetically sorted
#       list of pathnames matching the pattern.   If  no  matching
#       pathnames    are    found,    and   the   shell   variable
#       allow_null_glob_expansion  is  unset,  the  word  is  left
#       unchanged.   If  the  variable  is set, and no matches are
#       found, the word is removed.  When a pattern  is  used  for
#       pathname  generation, the character `.''  at the start of
#       a name or immediately following a slash  must  be  matched
#       explicitly,  unless  the shell variable glob_dot_filenames
#       is set.   The  slash  character  must  always  be  matched
#       explicitly.   In  other cases, the `.''  character is not
#       treated specially.

and

bash(1) set
#              -u      Treat unset variables as an error when per-
#                      forming parameter expansion.  If  expansion
#                      is  attempted  on  an  unset  variable, the
#                      shell prints an error message, and, if  not
#                      interactive,  exits with a non-zero status.
#

Greetings
Bernd
-- 
  (OO)      -- Bernd_Eckenfels@Wittumstrasse13.76646Bruchsal.de --
 ( .. )  ecki@lina.{inka.de,ka.sub.org}  http://home.pages.de/~eckes/
  o--o     *plush*  2048/A2C51749  eckes@irc  +4972573817  *plush*
(O____O)       If privacy is outlawed only Outlaws have privacy



Reply to: