TIP: Click on subject to list as thread! ANSI
echo: 4dos
to: Jack Stein
from: Jani Saksa
date: 1998-12-13 21:11:18
subject: Re: Few batch files needed...

лллл OS/2 -=> Propably Jack Stein wrote to Jani Saksa <=-

 Hello Jack!

 JS> Jani Saksa wrote in a message to All:

 JS> I need help from some guru!
 JS> There is 3 different batches that I would need:

 JS> 1) Delete all files that certain name...
 JS>    Could be used like this:
 JS>    DELALL kot*doc.?E2
 JS>
 JS> See the docs for delete/erase and wild cards.

 Oh! I didn't know it can also handle sub directorys... But seems
 like it can!

 JS> 2) Change certain piece of text from all selected files to
 JS> something else.    For example, change every "&" to
"&"
 JS> from all HTML files in directory    like this:
 JS>    CHANGE *.html "&" "&"
 JS>
 JS> Do you have SED, a stream editor?  If not, get it and I'll show you
 JS> how to easily do this.  There are other apps around that do search and
 JS> replace like this also, such as REPL.ZIP.  I use sed for this type of
 JS> thing though.  Often, if you don't have many files, or need to repeat
 JS> it often, it's better and easiser to do with a text editor's search and
 JS> replace routine, that way, you can see what you are changing, and are
 JS> less prone to errors (replacing things you didn't mean to replace.)

 Ok, thanks for help :) I already figured out a way to do it, but thanks
 anyway!

 JS> 3) Compile a list of reviews!

 JS> I have a list file like this:

 JS> 
 JS> Twilight Warrior
 JS> DooM 2
 JS> SP
 JS> 10 levels
 JS> *****

 JS> UAC
 JS> DooM 2
 JS> SP
 JS> 1 level
 JS> ***
 JS> 
 JS>
 JS> This can easily be done with REXX or AWK or GAWK.  SED and AWK are
 JS> freeware, REXX comes with OS/2.  If the stuff you want is all
 JS> identical, and seperated with a blank line or something identifiable,
 JS> it is easy.  Is that the case? IE, each table row has exactly 4 items,
 JS> and each row is seperated by a blank line, or something else
 JS> identifiable?  "****" are a lousy seperator though, as
they are special
 JS> characters and can be problematic protecting them from the shell.

 Ok, thanks again for the help... Instead of doing what you suggested
 I digged out my Pascal compiler and made a small .exe to do it...

 JS> Jack


- Sir Robin, Member of Falling Star Productions and TeamTNT
  E-Mail: jsaksa79{at}hotmail.com - ICQ: 15207181
  Homepage: http://doomnation.com/robin/

... Will the motorist who took the 2nd turn off the A5 kindly return it?

--- BBBS/2 v3.42 Lot-42
* Origin: BCG-Box 4 (2:222/0)
SEEN-BY: 396/1 632/0 371 633/260 262 267 270 371 635/444 506 728 639/50 252
@PATH: 222/0 22/10 220/851 20/11 24/888 396/1 633/260 635/506 728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.