Solaris / OpenSolarisThis forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have been trying to find a way to do this for a while but I can't seem to find the right way to search to find my answer. I need to be able to search through large amounts of text and find my REGEX and then send the line containing the REGEX and the immediately following it to the a text file. I think I can figure out how to redirect the output on my own so no assistance needed there. before it comes up "grep -A1" does not seem to work, I am assuming that is because I am using an old version (solaris 5.9).
unfortunately nawk and perl are not within my knowledge base. I did try to use sed but couldn't make it work and my knowledge of awk doesn't extend beyond setting a delimiter and selecting columns from a text stream. I am still pretty new to scripting and aside from 3 or 4 short emails from my boss I am completely self taught. I will put them on my to learn list though so I can use them in the future.
unfortunately where I work there is NO adding of software to our solaris machines. but luckily ggrep is on them already and it seems to do an excellent job at the task at hand. thanks for the helpful reply jlliagre.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.