roadzy
roadzy

Reputation: 39

Open a text file with a dot in the file path

Is this even possible? I am trying to script this install of IBM Clearcase and the path to it is like:

 ../disk1/InstallerImage_linux_gtk.x86/install.xml

The script barfs at the .x86 and it says "No such file or directory."

So I tried to just do vim ../disk1/InstallerImage_linux_gtk.x86/install.xml in a terminal and it opens the .x86 like a folder and allows you to select a file to edit instead of opening it directly.

Is there a way around this? Would the only way be to rename the folder before, do the sed voodoo and then move it back with the . in the name?

I guess I missed the obvious. I guess I could cd to the directory first and then do sed -i '' install.xml.

More info: RHEL 6.5 Bash Script

Upvotes: 1

Views: 173

Answers (2)

Oldest Software Guy
Oldest Software Guy

Reputation: 741

I think you have created a file with a seriously strange file name. Do this:

$ cd /path/to/where/you/run/the/script/from
$ file ..
$ file ../disk1
$ file ../disk1/InstallerImage_linux_gtk.x86
$ file ../disk1/InstallerImage_linux_gtk.x86/install.xml

Every component of the relative path (beginning with "..") must be a directory. Only the final line should claim to be an ordinary file.

Upvotes: 0

VonC
VonC

Reputation: 1327814

You need to script a silent ClearCase installation, using one of the sample response files for Rational ClearCase.
That would avoid the need to open any file in vim.

See "Installing silently", which involves the following steps:

  1. Run a silent install of Installation Manager using the Installation Manager installer.
  2. Obtain a copy of the product response file and update it for your environment. If you want to record a response file using Installation Manager, see the Installation Manager information center for instructions.
  3. Run a silent install of the Rational product using the Installation Manager.

Upvotes: 1

Related Questions