On Mon, Sep 24, 2007 at 03:04:27PM +0900, Konrad M. wrote:
Quoth Todd B.:
Todd B. wrote:
I’ve nevver know a blank character at the
end of a file name to be significant.
“never known” … sorry.
Yes, on *nix systems this is significant (probably windows too, I’m just
unfamiliar with it). You can also do "ruby myprog.rb\ " to escape the space.
If I’m not mistaken, MacOS X uses bash as its default shell. That would
mean you don’t actually need to escape the space if you use quotes:
$ ruby "myprog.rb "
The same is true of (t)csh:
ruby 'myprog.rb ’
In either shell, whether you use single or double quotes doesn’t matter,
and escaping the space (without quotes) also works.
Whether or not the space is significant when first naming the file
depends on how you name it. I believe that is true on MS Windows as
as systems such as MacOS X, various Linux distributions, SysV and BSD
Unix systems, and so on – though I don’t have an MS Windows machine in
front of me to test it. An extra space after a filename shouldn’t
produce a space character in the the filename itself when entered at a
command line shell, but will probably do so with certain GUI-oriented
means of naming files.