Re: shell scripting: grepping multiple patterns, logically ANDed

2012-06-30 Thread Giorgos Keramidas
On Wed, 27 Jun 2012 10:25:46 -0400, Aleksandr Miroslav alexmiros...@gmail.com wrote: hello, I'm not sure if this is the right forum for this question, but here goes. I have the following in a shell script: #!/bin/sh if [ $# -eq 0 ]; then find /foo fi if [

shell scripting: grepping multiple patterns, logically ANDed

2012-06-27 Thread Aleksandr Miroslav
hello, I'm not sure if this is the right forum for this question, but here goes. I have the following in a shell script: #!/bin/sh if [ $# -eq 0 ]; then find /foo fi if [ $# -eq 1 ]; then find /foo | grep -i $1 fi if [ $# -eq 2 ]; then

Re: shell scripting: grepping multiple patterns, logically ANDed

2012-06-27 Thread Tim Daneliuk
On 06/27/2012 10:25 AM, Tim Daneliuk wrote: On 06/27/2012 09:25 AM, Aleksandr Miroslav wrote: hello, I'm not sure if this is the right forum for this question, but here goes. I have the following in a shell script: #!/bin/sh if [ $# -eq 0 ]; then find /foo fi

Re: shell scripting: grepping multiple patterns, logically ANDed

2012-06-27 Thread Tim Daneliuk
On 06/27/2012 09:25 AM, Aleksandr Miroslav wrote: hello, I'm not sure if this is the right forum for this question, but here goes. I have the following in a shell script: #!/bin/sh if [ $# -eq 0 ]; then find /foo fi if [ $# -eq 1 ]; then find

Re: shell scripting: grepping multiple patterns, logically ANDed

2012-06-27 Thread Tim Daneliuk
On 06/27/2012 10:33 AM, Tim Daneliuk wrote: On 06/27/2012 10:25 AM, Tim Daneliuk wrote: On 06/27/2012 09:25 AM, Aleksandr Miroslav wrote: hello, I'm not sure if this is the right forum for this question, but here goes. I have the following in a shell script: #!/bin/sh if [ $#

Re: shell scripting: grepping multiple patterns, logically ANDed

2012-06-27 Thread Brad Mettee
On 6/27/2012 11:25 AM, Tim Daneliuk wrote: On 06/27/2012 09:25 AM, Aleksandr Miroslav wrote: hello, I'm not sure if this is the right forum for this question, but here goes. I have the following in a shell script: #!/bin/sh if [ $# -eq 0 ]; then find /foo fi