[plug] a file without a name

Bill Cullen billc at wantree.com.au
Sun Oct 17 11:03:11 WST 1999


Tamara Thompson wrote:
> 
> Hey, thanks!  that ?  parameter is nifty!  It works with mv as well.
> 
> Yeah, I finally figured out that 177 octal was decimal 127 and the delete key, but still wasn't sure how to vi a file named <deletekey> :)
> 
> thanks a lot!
> Tamara
> 

Actually, the ? is a wildcard matching one single character

It's not that unusual to see files with unprintable characters
in their names - and delete or backspace are fairly common when
a program prompts for a filename and doesn't handle them
correctly. Another way to open the file would be:

vi `/bin/echo '\177'`

which won't try to open any other single character file names.

Another problem is if you have a filename starting  with
the - character. When you try to access the file

ie. vi -file1

your program usually thinks that you're trying to pass a parameter.
You can use the above technique in this situation or just 
qualify the filename:

ie: vi ./-file1

Bill.
-- 
---------------------------------------------------------------------
  Bill Cullen, ENFP, billc at wantree.com.au, Perth, Western Australia
               Life's too important to take seriously.
=====================================================================


More information about the plug mailing list