Jax Logan
asked on
Pattern not found in vi
I've got a strange problem: When I grep for a pattern (e.g. 8980) I find it in a file. But when I search for it in vi (forward or backwards) it says 'Pattern not found'.
The pattern is not broken by a linebreak in the file.
What up with dat? It's driving me bonkers...
The pattern is not broken by a linebreak in the file.
What up with dat? It's driving me bonkers...
ASKER
sure.
vi
then either
/8980
or
?8980
vi
then either
/8980
or
?8980
If the string "8980" is in the file, either of those commands should search for the next/previous occurence.
Are you looking for the string "8980" or a 2 character string with a hex value of "8980"?
Also, is your terminal type set correctly?
Are you looking for the string "8980" or a 2 character string with a hex value of "8980"?
Also, is your terminal type set correctly?
ASKER
Hi Kdo,
I can't find that string exactly when I ftp the file to windows and use a text editor to search.
I'm looking for the string 8980...
Hmm, terminal I don't set. Should I try a TERM=vt100?
But I don't see how vi would care about the terminal type?
I can't find that string exactly when I ftp the file to windows and use a text editor to search.
I'm looking for the string 8980...
Hmm, terminal I don't set. Should I try a TERM=vt100?
But I don't see how vi would care about the terminal type?
ASKER
sorry, my comment should say 'I can' find that string on windows...
Most terminal emulators are vt100 or ANSI. If you're using either one and there is no odd behavior other than this it's unlikely that that is the problem.
How big is the file? Can you dump it and examine the contents?
od -xa filename
Kent
How big is the file? Can you dump it and examine the contents?
od -xa filename
Kent
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Can you post exactly what you're trying to run?