Technical article 104935

I get the error "Too many file names" when trying to read a file in vi(C).

OpenServer 5.0.0

Written · Last revised

Problem

I want to read a file from my home directory into vi(C). I am using the command:

:r $HOME/foo

where "foo" is the name of the file I want to read.

This results in the error message:
Too many file names

Cause

This problem is caused by a fault in the way that vi(C) expands environment variables.

Solution

SCO is aware of this problem and is working to resolve it. It is scheduled to be addressed in a future release of SCO OpenServer.

Currently, the work-around is to explicitly specify the
path to the file you want to edit.  For example:
:r /usr/fred/foo

From the Xinuos technical article database, record 104935. Reproduced with permission. The original is at www.sco.com/ta/104935, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.