Re: Spaces in file and directory names.

I don't know how to respond to this.  How did my choice of shells
enter the discussion?  I use the Z shell which handles this very well,
thank you very much.

My point of my exercise was to show that the C shell and its cousin
the tcsh don't handle this well at all.  Is this the only thing the C
shell sucks at?  No.  Does that encourage the majority of UNIX users
from using it as their interactive shell?  No.  Do may users write
scripts in this language?  Yes, unfortunately.

As for scripting, I whould hardly call that foreach a script.  It is a
plain old interactive command handled by the command line editor of
the finer shells (although not the tcsh).

Please lets not talk about this any more.  I am convinced.  Spaces are
an essential ingredient in any good file and directory name.


>>>>> On Mon, 14 Dec 1998 16:16:43 -0500 (EST), you said:
  TGL> On 14 Dec 1998, Gisli Ottarsson wrote:

  >> % touch "First File" "Second File"
  >> % foreach file (*)
  >> %   ls $file
  >> % end
  >> ls: First: No such file or directory
  >> ls: File: No such file or directory
  >> ls: Second: No such file or directory
  >> ls: File: No such file or directory
  >> Spaces at the end of file names are also good for a few laughs.
  >> I am not advocating disallowing spaces in file names, just suggesting
  >> that Gnome should not promote this bad idea.  I am pleased to hear
  >> that the standard gnome directories will not contain names with
  >> embedded spaces.

  TGL> % touch "1 2 3" "a b c"
  TGL> % for i in *
  for> do
  for> ls -l $i
  for> done
  TGL> -rw-r--r--   1 tlewis   tlewis          0 Dec 14 16:15 1 2 3
  TGL> -rw-r--r--   1 tlewis   tlewis          0 Dec 14 16:15 a b c
  TGL> %

  TGL> Maybe you need to get a better shell.  I don't see any problem at
  TGL> all with spaces in file names.

  TGL> -- 
  TGL> Todd Graham Lewis      (800) 719-4664, x2804

  TGL> "It's still ludicrous that nobody's ever made a run at us by making UNIX
  TGL>  a popular platform on PCs.  It's almost too late now."  -- Steve Balmer
  TGL> "It is too late."   -- Bill Gates             _Newsweek_, 6/23/97, p. 82

  TGL> -- 
  TGL>         FAQ: Frequently-Asked Questions at
  TGL>          To unsubscribe: mail with 
  TGL>                        "unsubscribe" as the Subject.

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