From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from wproxy.gmail.com ([64.233.184.234]) by speech.braille.uwo.ca with esmtp (Exim 3.36 #1 (Debian)) id 1FXQtg-0001ZS-00 for ; Sat, 22 Apr 2006 18:48:12 -0400 Received: by wproxy.gmail.com with SMTP id i22so561404wra for ; Sat, 22 Apr 2006 15:48:11 -0700 (PDT) Received: by 10.65.75.2 with SMTP id c2mr1999754qbl; Sat, 22 Apr 2006 15:48:11 -0700 (PDT) Received: by 10.64.53.13 with HTTP; Sat, 22 Apr 2006 15:48:11 -0700 (PDT) Message-ID: <4a202ad70604221548u69bacc5ao7299473051c8e0ad@mail.gmail.com> Date: Sat, 22 Apr 2006 16:48:11 -0600 From: "Levi Campbell" To: "Speakup is a screen review system for Linux." Subject: Re: More scripting help In-Reply-To: <001401c6665e$58634ea0$1d02a8c0@sparky> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <000b01c6665d$882278b0$1d02a8c0@sparky> <4a202ad70604221543k51d7b449t48c03c451ea918c5@mail.gmail.com> <001401c6665e$58634ea0$1d02a8c0@sparky> X-BeenThere: speakup@braille.uwo.ca X-Mailman-Version: 2.1.8rc1 Precedence: list Reply-To: "Speakup is a screen review system for Linux." List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 22:48:12 -0000 then you would do this as follows: for FILE in 'locate *.rtf'; do unrtf --nopics --text '$FILE' >'$FILE.txt' && rm -f $FILE; done On 4/22/06, Chris Norman wrote: > Bash. > > Cheers, > > Chris Norman > > ----- Original Message ----- > From: "Levi Campbell" > To: "Speakup is a screen review system for Linux." > Sent: Saturday, April 22, 2006 11:43 PM > Subject: Re: More scripting help > > > > what shell are you using? > > > > On 4/22/06, Chris Norman wrote: > >> Hi people, > >> I want to change all the RTF files on my computer into TXT ones. I tri= ed > >> the > >> following: > >> > >> for FILE in `locate *.rtf` > >> do > >> { > >> unrtf --nopics --text '$FILE' >'$FILE.txt' > >> rm -f $FILE > >> } > >> done > >> > >> But I have a problem, unrtf says there's an error opening the file, bu= t > >> it > >> won't give me a name, so I don't know if my variable is getting asigne= d > >> properly, I just know that for every file, I get a "Can't open file" > >> error. > >> > >> Any ideas? > >> > >> Cheers. > >> > >> PS: I would also like to avoid (if at all possible) the crap that unrt= f > >> puts > >> into the resulting text file, is this possible? > >> > >> Cheers, > >> > >> Chris Norman > >> > >> > >> > >> _______________________________________________ > >> Speakup mailing list > >> Speakup@braille.uwo.ca > >> http://speech.braille.uwo.ca/mailman/listinfo/speakup > >> > > > > _______________________________________________ > > Speakup mailing list > > Speakup@braille.uwo.ca > > http://speech.braille.uwo.ca/mailman/listinfo/speakup > > > _______________________________________________ > Speakup mailing list > Speakup@braille.uwo.ca > http://speech.braille.uwo.ca/mailman/listinfo/speakup >