LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
LinkBack Search this Thread
Old 08-03-2006, 10:01 AM   #1
richikiki
Member
 
Registered: Mar 2005
Location: Montréal, Québec, Canada
Distribution: Slackware 12.1 x32, 13.1 x64
Posts: 90

Rep: Reputation: 15
Question grep -r on a Sun Solaris


I would like to know if it is possible to have a grep recursive on a sun solaris: SunOs 5.8
 
Old 08-04-2006, 01:30 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Ubuntu, OEL
Posts: 9,157

Rep: Reputation: 238Reputation: 238Reputation: 238
This "-r" is an unnecessary GNU grep extension.

Unix philosophy is not to duplicate functionalities in multiple commands, but to have instead specialized commands that do well one thing and work easily together.

You can do something like this:

Code:
find . -type f -exec grep somepattern {} +
Of course, if you insist wanting a "grep -r" for Solaris, just install GNU grep on it, Unix philosophy is also about freedom of choice

Last edited by jlliagre; 08-04-2006 at 01:32 AM.
 
1 members found this post helpful.
Old 08-07-2006, 08:12 AM   #3
richikiki
Member
 
Registered: Mar 2005
Location: Montréal, Québec, Canada
Distribution: Slackware 12.1 x32, 13.1 x64
Posts: 90

Original Poster
Rep: Reputation: 15
Woow,

This is a powerful command :

jlliagre Thanks A LOT ! ! !
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference Between Sun, Sun Os & Solaris rajaniyer123 Solaris / OpenSolaris 5 01-04-2010 07:28 AM
Sun solaris 10 khdo80 Linux - Software 3 02-17-2005 12:04 PM
No grep -A possible under Solaris ? markraem Solaris / OpenSolaris 4 11-29-2004 12:29 AM
Aquiring Sun Solaris OS valsus Solaris / OpenSolaris 1 11-22-2004 10:08 PM
SUN Solaris vs Linux josealexandre Solaris / OpenSolaris 13 04-25-2004 08:44 AM


All times are GMT -5. The time now is 07:13 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration