#!/bin/sh function sub { xtmkdata -c 'fix(line(),8,R,0)' -l $1 -a No | xtrand -a key1 -M 100000 -C 100000 -S 1 | xtrand -a key2 -M 100000 -C 10000 -S 1 | xtrand -a key3 -M 100000 -C 1000 -S 1 | xtrand -a key4 -M 100000 -C 100 -S 1 | xtrand -a qtty -M 1 -C 3 -S 1 | xtrand -a price -M 100 -C 200 -S 1 | xtrand -a rand1 -M 100 -C 800 -S 1 | xtrand -a rand2 -M 100 -C 86400 -S 1 | xtsetchr -v '20030701' -a date1 | xtsetchr -v '000000' -a time1 | xtcal -c 'dayadd($date1,$rand1)' -a date2 | xtcal -c 'timeadd($time1,$rand2)' -a time2 | xtsetchr -v '123' -a s1 | xtsetchr -v '123' -a s2 | xtsetchr -v '123' -a s3 | xtsetchr -v '123' -a s4 | xtheader -l "$title" -c "$comment" -o indat/dat$1.xt } mkdir -p indat sub 100 sub 500 sub 1000 sub 2000 sub 100000 sub 500000 sub 1000000 sub 2000000