[comp.sources.atari.st] v03i086: xxxx -- Insert numbers into files

koreth@panarthea.ebay.sun.com (Steven Grimm) (08/15/90)

Submitted-by: cs325ec@ux1.cso.uiuc.edu (Gregory Lemperle-Kerr)
Posting-number: Volume 3, Issue 86
Archive-name: xxxx


XXXX

This program was written for a friend who was printing up raffle
tickets on his ST with PageStream.  It will search through a
file and replace a sequence of XXXXs with an incremental counter.

usage: xxxx filename.ext -start -count -numberofx -duplicates

e.g. from mupfel or gulam:

xxxx filename.doc -1000 -250 -4 -2

will replace 250 sequences of 4 'X's with a counter starting at
1000 and going through 1249.  Actually 500 replacements will be
done since duplicates is set to 2.  My friend had a stub and
a name/address form so each had to be numbered the same.

('xxxx filename.ext' will default to the those values - 1000,250,4,2).

'xxxx' will return instructions.

Nitty gritty: if there are not enough sequences of 'X's, new files will
	be created.  e.g. my friend had 5 pages of 3 tickets in a
	file called raffle.doc - the output of XXXX was into sixteen
	files called raf000.doc - raf015.doc, since 16*5*3 >= 250.

-- Greg

table
 !"#$%&'()*+,-./0123456789:;<=>?
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
begin 644 xxxxsrc.lzh
M'$(M;&@Q+4\"  #= P  *#Z7%"  !G)E861M90T S.6RODC !BXF""/!]/K_z
M]9_/]^_G=>W\W@';WM:KL7P!8?']6OE<V9JDT[)1KZ[X4S+^7:@Y=R58TR"?y
M<4@,%TM:1)_$>"1<Z'W_>0S!=0:=<2,[^ ZC"XY?W&6K$"[*PS;;ISNJ['"Dx
M:L?%;:1&02,.A2:<JDT@/CH6;9"2*1'\P$2=<%L"5^I@J_ I0\8@Z?S5)$B9w
M4?EF2"DB^?F*'THO\ <[C-H/W[?%=Q@8GX !<2/QE* :>N$=S["8P0-_"T$3v
M[YSIR3*E>@>-1_YB=>RBV0)0XC(V?Y\!IAKY#X9W.V2&% ]M,B_U V4-?)KIu
MU^@).IT_&\&0[&&X$,%P/>$W!)DRA5X-=I#,*@N#MR2TK3[J'?" UW.+>M:?t
MN3*\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