Jump to content

Question on Unix vi editor


Recommended Posts

Using the vi editor on HPUX today (yes, this person is working today, despite the beautiful autumn weather), I had to find a certain constant in a large file. The constant was 'EQUAL/IN' (without the apostrophe). So I entered the following command in vi:

/EQUAL/IN

and hit the enter key. Nothing happened.

It seems that the slash in my search constant interferes with the slash search command. Is there any way to specify a slash in the search constant? Some kind of escape, perhaps?

Sorry for asking Unix questions in the Linux forum :blush: but I believe it's pretty close.

Link to comment
Share on other sites

This would be a better place to post this question Pat.

http://www.unix-manuals.com/forum/index.php

Thanks for the link; I will visit when I have another Unix question.

The escape character is a backslash (\). The string you want is /EQUAL\/IN

Thanks for the backslash - it works!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy