Re: [OCLUG-Tech] stupid bash question: BASH IFS trick

2009-03-25 Thread Walt Sullivan
BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; } You could try "diff --recursive dir1 dir2", and let diff worry about the filenames. Or, if you're dealing with filenames with embedded spaces, you could change what Bash thinks the space in the filenames is for, by altering the

Re: [OCLUG-Tech] stupid bash question

2009-03-25 Thread Darcy Whyte
Hi, I've not tried "Stupid Bash" yet. I'll have to install it sometime. I've been using a shell script that looks like this: directoryCompare.sh cd $1 find . | sort > ~/directoryCompareLeft.txt cd $2 find . | sort > ~/directoryCompareRight.txt cd ~ sdiff -s directoryCompareLeft.txt directoryComp

Re: [OCLUG-Tech] stupid bash question

2009-03-25 Thread Darcy Whyte
Hi, I've not tried "Stupid Bash" yet. I'll have to install it sometime. I've been using a shell script that looks like this: directoryCompare.sh cd $1 find . | sort > ~/directoryCompareLeft.txt cd $2 find . | sort > ~/directoryCompareRight.txt cd ~ sdiff -s directoryCompareLeft.txt directoryCom

Re: [OCLUG-Tech] stupid bash question

2009-03-15 Thread Darcy Whyte
Hi, I've not tried "Stupid Bash" yet. I'll have to install it sometime. I've been using a shell script that looks like this: directoryCompare.sh cd $1 find . | sort > ~/directoryCompareLeft.txt cd $2 find . | sort > ~/directoryCompareRight.txt cd ~ sdiff -s directoryCompareLeft.txt directoryComp

Re: [OCLUG-Tech] stupid bash question

2009-03-14 Thread Timothy Brier
I know you're asking for a bash script, but I can send you a python script that will do the job. -Tim. ala...@twobikes.ottawa.on.ca wrote: I have two directories which are mostly the same. I need to compare the files in them (using cmp) to confirm this. Unfortunately, some of the files (whic

Re: [OCLUG-Tech] stupid bash question

2009-03-14 Thread Damian Gerow
What about: diff -rq oneDirectory otherDirectory ? Nataliya Korovkina wrote: : IFS="\n" : for i in `cat List` : do : (IFS="\n" cmp $i $otherdir/$i) : done : : "List" contains file names as they are: : file 1 : file 2 : ... : (without \, \\ and so on) : : Good luck! : : On Sat, Mar 14, 2009 at

Re: [OCLUG-Tech] stupid bash question

2009-03-14 Thread Nataliya Korovkina
IFS="\n" for i in `cat List` do (IFS="\n" cmp $i $otherdir/$i) done "List" contains file names as they are: file 1 file 2 ... (without \, \\ and so on) Good luck! On Sat, Mar 14, 2009 at 3:18 PM, wrote: > I have two directories which are mostly the same. I need to compare the > files in them (

[OCLUG-Tech] stupid bash question

2009-03-14 Thread R RENAUD
To: ala...@twobikes.ottawa.on.ca Subject: [OCLUG-Tech] stupid bash question In-Reply-To: References: X-Mailer: VM 8.0.9 under Emacs 22.2.1 (i486-pc-linux-gnu) FCC: ~/Mail/outgoing --text follows this line-- ala...@twobikes.ottawa.on.ca writes: | I have two directories which are mostly the same

[OCLUG-Tech] stupid bash question

2009-03-14 Thread alayne
I have two directories which are mostly the same. I need to compare the files in them (using cmp) to confirm this. Unfortunately, some of the files (which Other People created, not me) have blanks in the filenames. I thought I could just go for i in `cat ListOfFiles` do cmp $i $OtherDirector