Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8323407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:43:12+00:00 2026-06-08T23:43:12+00:00

I have been using Linux env and recently migrated to solaris. Unfortunately one of

  • 0

I have been using Linux env and recently migrated to solaris. Unfortunately one of my bash scripts requires the use of grep with the P switch [ pcre support ] .As Solaris doesnt support the pcre option for grep , I am obliged to find another solution to the problem.And pcregrep seems to have an obvious loop bug and sed -r option is unsupported !
I hope that using perl or nawk will solve the problem on solaris.

I have not yet used perl in my script and am unware neither of its syntax nor the flags.

Since it is pcre , I beleive that a perl scripter can help me out in a matter of minutes. They should match over multiple lines .

Which one would be a better solution in terms of efficiency the awk or the perl solution ?

Thanks for the replies .

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T23:43:13+00:00Added an answer on June 8, 2026 at 11:43 pm

    These are some grep to perl conversions you might need:

    grep -P PATTERN FILE(s) —> perl -nle 'print if m/PATTERN/' FILE(s)

    grep -Po PATTERN FILE(s) —> perl -nle 'print "$1\n" while m/(PATTERN)/g' FILE(s)

    That’s my guess as to what you’re looking for, if grep -P is out of the question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using 'bash' since the time I have been using Unix- Linux/Solaris.
I have recently been using pthreads on Linux and want to start looking into
gcc 4.4.2 / Visual Studio C++ 2008 I have been using cmake on linux,
I have been using play 1.2.5rc4 for development of one app and I have
I am using GNU/Linux (Ubuntu + Gnome). I have been using netbeans on windows
Folks, I had a quick question about Amazon EC2, I have been recently using
So far I have been using the linux api and boost libraries in this
What is the best code compare tool available for Linux? I have been using
I have been working with linux server using epoll and almost finished it. And
I'm a fan of Mercurial and have been using it on Linux for a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.