?
Solved

grep for regular expression in Solaris

Posted on 2010-08-26
8
Medium Priority
?
973 Views
Last Modified: 2013-12-28
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
Comment
Question by:nlrreddy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 6

Expert Comment

by:DalHorinek
ID: 33537835
What about using this?

http://www.pcre.org/
0
 
LVL 84

Expert Comment

by:ozo
ID: 33537837
does egrep work?  what is the expression?
can you use a perl command instead?
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 33537968
can you elaborate on what you want to do? can you give example?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:nlrreddy
ID: 33539258
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
 
LVL 84

Accepted Solution

by:
ozo earned 501 total points
ID: 33539313
egrep -R 'abc[a-zA-Z0-9]{10}_[a-zA-Z0-9]{4}' .
0
 
LVL 5

Assisted Solution

by:shajithchandran
shajithchandran earned 501 total points
ID: 33544856
you can use simple grep with -R option too
0
 
LVL 2

Assisted Solution

by:Mohan Shivaiah
Mohan Shivaiah earned 498 total points
ID: 33547433
sed -n '/abc\[a-zA-Z0-9\]{10}_\[a-zA-Z0-9\]{4}/,$ p' file_name > output_file.out
0
 

Author Closing Comment

by:nlrreddy
ID: 33563697
Although the solution is not complete it helped me get ideas on this
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses
Course of the Month8 days, 13 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question