Re: bash script question

2008-04-19 Thread Tzafrir Cohen
On Fri, Apr 18, 2008 at 08:39:10PM -0600, ChadDavis wrote: > > > > I just wonder if this is supposed to be used where 'svn export' better > > be. > > > > > > No, its the Sysdeo tomcat plugin's export WAR file feature. it doesn't, as > far as I can tell, have a mechanism for filtering out things l

Re: bash script question

2008-04-18 Thread ChadDavis
> > I just wonder if this is supposed to be used where 'svn export' better > be. > > No, its the Sysdeo tomcat plugin's export WAR file feature. it doesn't, as far as I can tell, have a mechanism for filtering out things like .svn.

Re: bash script question

2008-04-18 Thread Tzafrir Cohen
On Fri, Apr 18, 2008 at 10:27:30AM -0600, ChadDavis wrote: > I have a simple bash scripting question. > > I have a tree of directories from which I would like to recursively dig > into, removing source control meta-information from. In this case, the > meta-data is in .svn folders. I just wonder

Re: bash script question

2008-04-18 Thread Bob McGowan
Jochen Schulz wrote: Ken Irving: If you want to remove the .svn/ directories and everything within them, something like this should work (remove the 'echo' if the output looks ok): $ cd starting/directory $ find . -type d -name .svn -exec echo rm -r {} \; GNU find also accepts the parame

Re: bash script question

2008-04-18 Thread Jochen Schulz
Ken Irving: > > If you want to remove the .svn/ directories and everything within them, > something > like this should work (remove the 'echo' if the output looks ok): > > $ cd starting/directory > $ find . -type d -name .svn -exec echo rm -r {} \; GNU find also accepts the parameter (or be

Re: bash script question

2008-04-18 Thread ChadDavis
Good to know. Thank. On Fri, Apr 18, 2008 at 11:49 AM, Bob McGowan <[EMAIL PROTECTED]> wrote: > ChadDavis wrote: > > > I have a simple bash scripting question. > > > > I have a tree of directories from which I would like to recursively dig > > into, removing source control meta-information from.

Re: bash script question

2008-04-18 Thread Bob McGowan
ChadDavis wrote: I have a simple bash scripting question. I have a tree of directories from which I would like to recursively dig into, removing source control meta-information from. In this case, the meta-data is in .svn folders. Does anyone have any elegant suggestions on how to do this?

Re: bash script question

2008-04-18 Thread Ken Irving
On Fri, Apr 18, 2008 at 10:27:30AM -0600, ChadDavis wrote: > I have a simple bash scripting question. > > I have a tree of directories from which I would like to recursively dig into, > removing source > control meta-information from. In this case, the meta-data is in .svn > folders. > > Does

Re: bash script question

2008-04-18 Thread ChadDavis
That's great. I also saw in Unix Power Tools that you can use xargs to similar effect? On Fri, Apr 18, 2008 at 10:55 AM, Martin Kraus <[EMAIL PROTECTED]> wrote: > On Fri, Apr 18, 2008 at 10:27:30AM -0600, ChadDavis wrote: > > I have a simple bash scripting question. > > > > I have a tree of dire

Re: Bash script question

2006-12-20 Thread Michelle Konzack
Am 2006-12-07 15:20:26, schrieb H.S.: > Stephen R Laniel wrote: > >find directoryName -mtime +X -print0 |xargs -0 rm '{}' This can handel daily files for unlimited years > $> find directoryName -mtime +X -exec rm -f '{}' \; This can handel only files from the last 15 years :-P Thanks, Greeti

Re: Bash script question

2006-12-08 Thread Bob McGowan
The '-print0' of 'find' and the '-0' of 'xargs' (those are the number zero, not a capital o) prevent problems processing file names that contain white space (such as you might get from other OS's, but can also get on UNIX/Linux systems when using GUI programs that create files). It uses a 'nul

Re: Bash script question

2006-12-07 Thread Nate Bargmann
* Almut Behrens <[EMAIL PROTECTED]> [2006 Dec 07 16:08 -0600]: > On Thu, Dec 07, 2006 at 03:41:53PM -0600, Ron Johnson wrote: > > > > OP specifically noted: > > I'm not interested in the actual created/modified date The reason for that was so I don't clobber other files that may be older, jus

Re: Bash script question

2006-12-07 Thread Almut Behrens
On Thu, Dec 07, 2006 at 03:41:53PM -0600, Ron Johnson wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 12/07/06 15:12, Almut Behrens wrote: > > On Thu, Dec 07, 2006 at 12:16:54PM -0600, Nate Bargmann wrote: > >> I have a directory of files that are created daily using > >> filename

Re: Bash script question

2006-12-07 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/07/06 15:12, Almut Behrens wrote: > On Thu, Dec 07, 2006 at 12:16:54PM -0600, Nate Bargmann wrote: >> I have a directory of files that are created daily using >> filename-`date +%Y%m%d`.tar.gz so I have a directory with files whose >> names adva

Re: Bash script question

2006-12-07 Thread Kevin Mark
On Thu, Dec 07, 2006 at 11:41:23AM -0700, John Schmidt wrote: > On Thursday 07 December 2006 11:16, Nate Bargmann wrote: > > Since there is a lot of knowledge on this list, I thought I'd aske > > here. > > > > This may be trivial, but I'm not even sure how to search for what I > > want to do. > > >

Re: Bash script question

2006-12-07 Thread Almut Behrens
On Thu, Dec 07, 2006 at 12:16:54PM -0600, Nate Bargmann wrote: > > I have a directory of files that are created daily using > filename-`date +%Y%m%d`.tar.gz so I have a directory with files whose > names advance from filename-20061201.tar.gz to filename-20061202.tar.gz > to filename-20061203.tar.

Re: Bash script question

2006-12-07 Thread Ken Irving
On Thu, Dec 07, 2006 at 07:57:29PM +0100, Albert Dengg wrote: > On Thu, Dec 07, 2006 at 12:16:54PM -0600, Nate Bargmann wrote: > > Since there is a lot of knowledge on this list, I thought I'd aske > > here. > > > > This may be trivial, but I'm not even sure how to search for what I > > want to do

Re: Bash script question

2006-12-07 Thread H.S.
Stephen R Laniel wrote: The easiest way wouldn't involve the filename at all. If you know that a file created on date D is stamped with date D -- i.e., if your files all look like so: (13:09) [EMAIL PROTECTED]:~$ ls filename-20061207.tar.gz -rw-r--r-- 1 slaniel slaniel 0 2006-12-07 13:09 file

Re: Bash script question

2006-12-07 Thread Albert Dengg
On Thu, Dec 07, 2006 at 12:16:54PM -0600, Nate Bargmann wrote: > Since there is a lot of knowledge on this list, I thought I'd aske > here. > > This may be trivial, but I'm not even sure how to search for what I > want to do. > > I have a directory of files that are created daily using > filenam

Re: Bash script question

2006-12-07 Thread Ben Breslauer
Nate Bargmann wrote: I have a directory of files that are created daily using filename-`date +%Y%m%d`.tar.gz so I have a directory with files whose names advance from filename-20061201.tar.gz to filename-20061202.tar.gz to filename-20061203.tar.gz and so on. Based on the date in the filename, I

Re: Bash script question

2006-12-07 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/07/06 12:16, Nate Bargmann wrote: > Since there is a lot of knowledge on this list, I thought I'd aske > here. > > This may be trivial, but I'm not even sure how to search for what I > want to do. > > I have a directory of files that are create

Re: Bash script question

2006-12-07 Thread John Schmidt
On Thursday 07 December 2006 11:16, Nate Bargmann wrote: > Since there is a lot of knowledge on this list, I thought I'd aske > here. > > This may be trivial, but I'm not even sure how to search for what I > want to do. > > I have a directory of files that are created daily using > filename-`date +

Re: Bash script question

2006-12-07 Thread Stephen R Laniel
On Thu, Dec 07, 2006 at 12:16:54PM -0600, Nate Bargmann wrote: > I have a directory of files that are created daily using > filename-`date +%Y%m%d`.tar.gz so I have a directory with files whose > names advance from filename-20061201.tar.gz to filename-20061202.tar.gz > to filename-20061203.tar.gz

Re: Bash script question (was: Re: Netscape 4.73 wrapper broken)

2000-06-25 Thread Colin Watson
kmself@ix.netcom.com wrote: >The key difference is that $( command list ) is nestable without >quoting, backticks are not. [snip] >The functionality is common in a number of shells other than bash, >though I'm not quite sure which. I believe the Unix posix-compliant >(bastardized korn) and possi

Re: Bash script question (was: Re: Netscape 4.73 wrapper broken)

2000-06-25 Thread kmself
On Fri, Jun 23, 2000 at 08:51:44PM -0400, Peter Kovacs wrote: > On Sat, 24 Jun 2000, Mark Phillips wrote: > > for f in $(cd > > From man 1 bash: >Command Substitution >Command substitution allows the output of a command to >replace the command name. There are two

Re: Bash script question (was: Re: Netscape 4.73 wrapper broken)

2000-06-24 Thread Andre Berger
Andre Berger <[EMAIL PROTECTED]> writes: Sorry, use kill -9 $(pidof communicator-smotif.real) or something like that. Andre > Peter Kovacs <[EMAIL PROTECTED]> writes: > > > On Sat, 24 Jun 2000, Mark Phillips wrote: > > From man 1 bash: > >Command Substitution > >Command

Re: Bash script question (was: Re: Netscape 4.73 wrapper broken)

2000-06-24 Thread Marek Habersack
** On Jun 24, Mark Phillips scribbled: > Peter Kovacs [EMAIL PROTECTED] wrote: > > On Fri, 23 Jun 2000, Peter Kovacs wrote: > > > > > I'm sure that a fix has already been posted, but this works for me > > > (replace the code above with this): > > > > > > for d in /usr/lib/netscape/base-4/

Re: Bash script question (was: Re: Netscape 4.73 wrapper broken)

2000-06-24 Thread Marek Habersack
** On Jun 24, Mark Phillips scribbled: > Corey Popelier [EMAIL PROTECTED] wrote: > > > Yes I have this problem also. I assume we shall await a fix. And use > > Mozilla in the meantime :) [snip] > And the problem seems to be with a syntax error at the line > > for f in (cd $d;ls -1

Re: Bash script question (was: Re: Netscape 4.73 wrapper broken)

2000-06-24 Thread Andre Berger
Peter Kovacs <[EMAIL PROTECTED]> writes: > On Sat, 24 Jun 2000, Mark Phillips wrote: > From man 1 bash: >Command Substitution >Command substitution allows the output of a command to >replace the command name. There are two forms: > > $(command) >or >

Re: Bash script question (was: Re: Netscape 4.73 wrapper broken)

2000-06-23 Thread John Pearson
On Fri, Jun 23, 2000 at 08:51:44PM -0400, Peter Kovacs wrote > On Sat, 24 Jun 2000, Mark Phillips wrote: > > > What does "YMMV" stand for? > > YMMV = Your Mileage May Vary > > > An official fix has come through, and what it does is replace > > > > for f in (cd. > > > > by > > > >

Re: Bash script question (was: Re: Netscape 4.73 wrapper broken)

2000-06-23 Thread Peter Kovacs
On Sat, 24 Jun 2000, Mark Phillips wrote: > What does "YMMV" stand for? YMMV = Your Mileage May Vary > An official fix has come through, and what it does is replace > > for f in (cd. > > by > > for f in $(cd From man 1 bash: Command Substitution Command substitu

Re: Bash script question (was: Re: Netscape 4.73 wrapper broken)

2000-06-23 Thread Mark Phillips
Peter Kovacs [EMAIL PROTECTED] wrote: > On Fri, 23 Jun 2000, Peter Kovacs wrote: > > > I'm sure that a fix has already been posted, but this works for me > > (replace the code above with this): > > > > for d in /usr/lib/netscape/base-4/wrapper.d ; do > > cd $d; > >

Re: Bash script question (was: Re: Netscape 4.73 wrapper broken)

2000-06-23 Thread Peter Kovacs
On Sat, 24 Jun 2000, Mark Phillips wrote: > for d in \ > /usr/lib/netscape/base-4/wrapper.d \ > /usr/lib/netscape/$VER \ > /usr/lib/netscape/$VER/$BIN ;do > for f in (cd $d;ls -1 . | sort); do > . $d/$f > done > done I'm sure