*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.

On 2/21/2013 12:23 PM, GofBorg wrote:[color=blue]

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.

[/color]

vi 1234\-\12\-1234

H.

Haitch wrote:
[color=blue]

On 2/21/2013 12:23 PM, GofBorg wrote:[color=green]

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.

[/color]

vi 1234\-\12\-1234

H.[/color]
Oooo I was so close…

vi 1234\-\12\-\1234

I see my mistake now. Thanks.

Haitch wrote:
[color=blue]

On 2/21/2013 12:23 PM, GofBorg wrote:[color=green]

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.

[/color]

vi 1234\-\12\-1234

H.[/color]
Hmmm…didn’t work either.

Haitch wrote:[color=blue]
[color=green]

On 2/21/2013 12:23 PM, GofBorg wrote:[color=darkred]

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.

[/color]

vi 1234\-\12\-1234

H.[/color]
Hmmm…didn’t work either.[/color]

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

I found the issue. Thanks for the help.

GofBorg wrote:
[color=blue]

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.[/color]

vi “1234-12-1234”


Does this washcloth smell like chloroform?

[color=blue]
vi “1234-12-1234”[/color]

That works as well. Thanks.

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

[color=blue][color=green]

vi “1234-12-1234”[/color]

That works as well. Thanks.[/color]

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

On 02/21/2013 12:49 PM, Jim Henderson wrote:[color=blue]

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

[color=green][color=darkred]

vi “1234-12-1234”[/color]

That works as well. Thanks.[/color]

Opened fine here on a Linux box without quotes or escaping any characters.[/color]

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.

On Thu, 21 Feb 2013 22:47:33 +0000, ab wrote:
[color=blue]

On 02/21/2013 12:49 PM, Jim Henderson wrote:[color=green]

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

[color=darkred]

vi “1234-12-1234”

That works as well. Thanks.[/color]

Opened fine here on a Linux box without quotes or escaping any
characters.[/color]

Yeah, there is nothing special about a hypen/dash in the filesystem.[/color]

Well, there’s one time it’s a problem - as the first character in the
filename, or (OK, two) after a space in the filename if the space isn’t
properly escaped.

Jim


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