Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: *nix filename with VI problem

Hybrid View

  1. #1
    GofBorg NNTP User

    *nix filename with VI problem

    Any ideas on how to open a file named 1234-12-1234 in vi?
    Can't seem to get it to interpret the dashes. I could rename it, edit it and
    rename it back to what it is but seems a bit daft to do it that way.



  2. #2

    Re: *nix filename with VI problem

    On 2/21/2013 12:23 PM, GofBorg wrote:
    > Any ideas on how to open a file named 1234-12-1234 in vi?
    > Can't seem to get it to interpret the dashes. I could rename it, edit it and
    > rename it back to what it is but seems a bit daft to do it that way.
    >
    >


    vi 1234\-\12\-1234

    H.


  3. #3
    GofBorg NNTP User

    Re: *nix filename with VI problem

    Haitch wrote:

    > On 2/21/2013 12:23 PM, GofBorg wrote:
    >> Any ideas on how to open a file named 1234-12-1234 in vi?
    >> Can't seem to get it to interpret the dashes. I could rename it, edit it
    >> and rename it back to what it is but seems a bit daft to do it that way.
    >>
    >>

    >
    > vi 1234\-\12\-1234
    >
    > H.

    Oooo I was so close...

    vi 1234\-\12\-\1234

    I see my mistake now. Thanks.

  4. #4
    GofBorg NNTP User

    Re: *nix filename with VI problem

    Haitch wrote:

    > On 2/21/2013 12:23 PM, GofBorg wrote:
    >> Any ideas on how to open a file named 1234-12-1234 in vi?
    >> Can't seem to get it to interpret the dashes. I could rename it, edit it
    >> and rename it back to what it is but seems a bit daft to do it that way.
    >>
    >>

    >
    > vi 1234\-\12\-1234
    >
    > H.

    Hmmm...didn't work either.

  5. #5
    GofBorg NNTP User

    Re: *nix filename with VI problem

    > Haitch wrote:
    >
    >> On 2/21/2013 12:23 PM, GofBorg wrote:
    >>> Any ideas on how to open a file named 1234-12-1234 in vi?
    >>> Can't seem to get it to interpret the dashes. I could rename it, edit it
    >>> and rename it back to what it is but seems a bit daft to do it that way.
    >>>
    >>>

    >>
    >> vi 1234\-\12\-1234
    >>
    >> H.

    > Hmmm...didn't work either.


    Normally in such a case I would just do vi 1234* but there are numerous
    files beginning with 1234...too many to open/close.



  6. #6
    GofBorg NNTP User

    Re: *nix filename with VI problem

    I found the issue. Thanks for the help.


  7. #7
    Joseph Marton NNTP User

    Re: *nix filename with VI problem

    GofBorg wrote:

    > Any ideas on how to open a file named 1234-12-1234 in vi?
    > Can't seem to get it to interpret the dashes. I could rename it, edit
    > it and rename it back to what it is but seems a bit daft to do it
    > that way.


    vi "1234-12-1234"

    --
    Does this washcloth smell like chloroform?

  8. #8
    GofBorg NNTP User

    Re: *nix filename with VI problem

    >
    > vi "1234-12-1234"


    That works as well. Thanks.

  9. #9
    Jim Henderson NNTP User

    Re: *nix filename with VI problem

    On Thu, 21 Feb 2013 19:12:41 +0000, GofBorg wrote:


    >> vi "1234-12-1234"

    >
    > That works as well. Thanks.


    Opened fine here on a Linux box without quotes or escaping any characters.

    Jim



    --
    Jim Henderson, CNA6, CDE, CNI, LPIC-1, CLA10, CLP10
    Novell Knowledge Partner

  10. #10
    ab NNTP User

    Re: *nix filename with VI problem

    On 02/21/2013 12:49 PM, Jim Henderson wrote:
    > On Thu, 21 Feb 2013 19:12:41 +0000, GofBorg wrote:
    >
    >
    >>> vi "1234-12-1234"

    >>
    >> That works as well. Thanks.

    >
    > Opened fine here on a Linux box without quotes or escaping any characters.


    Yeah, there is nothing special about a hypen/dash in the filesystem. Use
    tab-completion if nothing else, but my guess is that something about those
    characters is non-standard, like they're odd hyphens that you can get from
    stupid word processors... like curly-quotes that show up in nice ASCII
    text files and look broken because they're non-ASCII. In that case merely
    typing the hyphen directly could fail because, literally, its not the same
    character. Again, tab-completion

    vi 1
    #then press [tab]

    Good luck.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •