• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 985
  • Last Modified:

grep for regular expression in Solaris

Hello,

I want to regursively grep for a regular expression in SunOS 5.8 but couldn't do that. There is no equivalent option as --perl-regexp in Solaris 5.8

can anyone help me on that

Thanks,
0
nlrreddy
Asked:
nlrreddy
3 Solutions
 
DalHorinekCommented:
What about using this?

http://www.pcre.org/
0
 
ozoCommented:
does egrep work?  what is the expression?
can you use a perl command instead?
0
 
omarfaridCommented:
can you elaborate on what you want to do? can you give example?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
nlrreddyAuthor Commented:
below is the regular expression that I want to grep in all files recursively

abc[a-zA-Z0-9]{10}_[a-zA-Z0-9]{4}

with the above regular expression, can I find files with the above tag?
0
 
ozoCommented:
egrep -R 'abc[a-zA-Z0-9]{10}_[a-zA-Z0-9]{4}' .
0
 
shajithchandranCommented:
you can use simple grep with -R option too
0
 
Mohan ShivaiahCommented:
sed -n '/abc\[a-zA-Z0-9\]{10}_\[a-zA-Z0-9\]{4}/,$ p' file_name > output_file.out
0
 
nlrreddyAuthor Commented:
Although the solution is not complete it helped me get ideas on this
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now