1819965 Members
3439 Online
109607 Solutions
New Discussion

Search inside a script

 
SOLVED
Go to solution
hboo
Frequent Advisor

Search inside a script

Hello all
I´m trying to make a search inside a script of the string ".ec" and search works fine but search stops in strings like "conecting"
I supose it is because the string contains ec.. How i can do for only search strings with ".ec" including point.
Thanks...
7 REPLIES 7
IT_2007
Honored Contributor

Re: Search inside a script

open up with vi editor and then /.ec press Enter. To search whole file keep on pressing n letter.
Jeff_Traigle
Honored Contributor
Solution

Re: Search inside a script

. is a wildcard in the search. You need to escape it:

/\.ec
--
Jeff Traigle
Arunvijai_4
Honored Contributor

Re: Search inside a script

Hi,

Why not use "grep" with wildcards?

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
spex
Honored Contributor

Re: Search inside a script

Hi Hayse,

# grep '\.ec' file

PCS
James R. Ferguson
Acclaimed Contributor

Re: Search inside a script

Hi:

You need to escape the dot character since it is a metacharacter that means any character. In 'vi' type:

:/\.ec

Regards!

...JRF...
hboo
Frequent Advisor

Re: Search inside a script

Thanks all of you
Works good with :/\.ec

see you
; )
hboo
Frequent Advisor

Re: Search inside a script

See you
; )