Re: Problem with bash script

2009-06-16 Thread Karl Vogel
I botched the filter example in my previous blathering. This will ignore output from find containing patterns: root# find . -depth -print | fgrep -v -f /some/patterns Leaving off the -v will keep output containing those patterns. -- Karl Vogel I don't speak for the USAF

Re: Problem with bash script

2009-06-16 Thread Karl Vogel
>> On Tuesday, June 16, 2009 08:09:09 -0500 Carmel NY >> wrote: C> I am attempting to write a simple Bash script that will find all the C> '*.pem' files in a directory structure and move them to another C> directory. Using find and pax will correctly handle filenames with spaces and oth

Re: Problem with bash script

2009-06-16 Thread Mel Flynn
On Tuesday 16 June 2009 06:03:33 Daniel Underwood wrote: > > $ find ./ -name "*.pem" -exec cp {} /usr/home/tmp/something \; > > I'm a novice with shell scripting myself, but what's the difference > between that code and some variant thereof using a pipe and "xargs"? > Are they simply two different

Re: Problem with bash script

2009-06-16 Thread Matthew Seaman
Carmel NY wrote: I am attempting to write a simple Bash script that will find all the '*.pem' files in a directory structure and move them to another directory. It seems to work until I get to the copy part where it fails. My scripting skills are not that good. Perhaps someone could tell me what

Re: Problem with bash script

2009-06-16 Thread Daniel Bye
On Tue, Jun 16, 2009 at 02:33:37PM +, Paul Schmehl wrote: > --On Tuesday, June 16, 2009 08:09:09 -0500 Carmel NY > wrote: > > > > >I am attempting to write a simple Bash script that will find all the > >'*.pem' files in a directory structure and move them to another > >directory. It seems to

Re: Problem with bash script

2009-06-16 Thread Paul Schmehl
--On Tuesday, June 16, 2009 08:09:09 -0500 Carmel NY wrote: I am attempting to write a simple Bash script that will find all the '*.pem' files in a directory structure and move them to another directory. It seems to work until I get to the copy part where it fails. My scripting skills are no

Re: Problem with bash script

2009-06-16 Thread Carmel NY
On Tue, 16 Jun 2009 15:56:15 +0200 Bertram Scharpf wrote: > Hi, > > Am Dienstag, 16. Jun 2009, 09:09:09 -0400 schrieb Carmel NY: > > [...] It seems to work until I get to the copy part where it fails. > > > > My scripting skills are not that good. Perhaps someone could tell me > > what I am doi

Re: Problem with bash script

2009-06-16 Thread Daniel Underwood
> $ find ./ -name "*.pem" -exec cp {} /usr/home/tmp/something \; I'm a novice with shell scripting myself, but what's the difference between that code and some variant thereof using a pipe and "xargs"? Are they simply two different ways of achieving the same result? Or is there some more importa

Re: Problem with bash script

2009-06-16 Thread Moises Castellanos
Hi Carmel On Wed, Jun 17, 2009 at 8:39 AM, Carmel NY wrote: > I am attempting to write a simple Bash script that will find all the > '*.pem' files in a directory structure and move them to another > directory. It seems to work until I get to the copy part where it fails. > > My scripting skills

Re: Problem with bash script

2009-06-16 Thread Bertram Scharpf
Hi, Am Dienstag, 16. Jun 2009, 09:09:09 -0400 schrieb Carmel NY: > [...] It seems to work until I get to the copy part where it fails. > > My scripting skills are not that good. Perhaps someone could tell me > what I am doing wrong. > > # copy the file to another directory using the base name >

Problem with bash script

2009-06-16 Thread Carmel NY
I am attempting to write a simple Bash script that will find all the '*.pem' files in a directory structure and move them to another directory. It seems to work until I get to the copy part where it fails. My scripting skills are not that good. Perhaps someone could tell me what I am doing wrong.