Re: QOUTES

From: Jeremiah DeWitt Weiner (jdw_at_panix.com)
Date: 01/13/05

  • Next message: Shawn: "Re: output from cut command"
    Date: Thu, 13 Jan 2005 21:58:12 +0000 (UTC)
    
    

    Chris F.A. Johnson <cfajohnson@gmail.com> wrote:
    > It's also not a good idea to use spaces or colons in file names.

            Sun might disagree with you about the colons.

    Dbsera1:~$ ls /devices/
    pci@1f,2000:devctl pci@4,2000:devctl pci@6,2000:devctl pseudo

            Also stuff like /etc/hostname.hme0:1. Admittedly, those are not
    files one has to deal with often, or that the average user ever has to
    deal with.

            Come to think of it, why _do_ you recommend against colons in
    filenames? I agree that it seems odd and nonstandard, but it doesn't
    actually seem to cause much of a problem in practice. Bash doesn't list
    it as either a metacharacter or a control operator, although a colon in
    a filename does get escaped by autocompletion (and breaks autocompletion
    if you've typed it in yourself without escaping it, although failure to
    escape the colon doesn't seem to cause any harm.) I suppose that's
    because it's a path separator - having a directory with a colon in its
    name in your PATH does break things, but I'd argue that if you do something
    as weird as that, you deserve whatever you get.

    JDW


  • Next message: Shawn: "Re: output from cut command"

    Relevant Pages

    • Re: Looking for menu engine
      ... but have you tried escaping out the colon with a ... The manpage says you can escape "_" with a \, ...
      (Ubuntu)
    • Re: QOUTES
      ... > a filename does get escaped by autocompletion (and breaks autocompletion ... > escape the colon doesn't seem to cause any harm.) ... > because it's a path separator - having a directory with a colon in its ...
      (comp.unix.questions)
    • Re: Setting HTTP_PROXY for all users
      ... I need to put a colon in for the port number and can't see how ... >> to escape it so that the entry doesn't get chopped off halfway through. ...
      (freebsd-questions)
    • Re: // in macros
      ... can I escape the slash? ... > colon in there too. ... outlook kep turning it into a hyperlink without quotes so I didn't know ...
      (comp.lang.c)