... or a one-liner. Perl makes this sort of thing really easy. See the perl docs, specifically the perlrun document:
perl -pi '*.orig' -e 's/THIS TEXT/THAT TEXT/' * On Fri, 6 Dec 2002, Greg Nudelman wrote: > Try the Perl reg exp. Just google for "perl replace in file" It should be > like a 20-line script. > > Greg > > -----Original Message----- > From: Jason Carlamere [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 06, 2002 10:12 AM > To: JDJList > Subject: [jdjlist] sed equiv > > > I need to write a batch script for dos that opens a file in the script and > replaces a word > > for example > > The script finds [THIS TEXT] and replaces it with [THAT TEXT] > > for the unix and linux boxes I used sed but sed does not exist in dos and > > I can not install gnu's windows version on the boxes.. So does anyone know > of a command that does this > > -Jason > > --------------------------------------------------------- Joseph B. Ottinger [EMAIL PROTECTED] http://enigmastation.com IT Consultant ____________________________________________________ To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm Be respectful! Clean up your posts before replying ____________________________________________________
