pastebin - collaborative debugging tool
nrubsig.kpaste.net RSS

Difference between
modified post aa00dd04a by Anonymous on Wed 28th Feb 2024 15:00
original post 03b by Anonymous on Wed 28th Feb 2024 14:33
Download diff
Show old version | new version | both versions

    
11
#!/bin/ksh93
22
33
#
44
# makeseqtree1 - build a POSIX Makefile which generates the
55
# number sequence 1...n in small chunks
66
#
77
# This is intenended to be a filesystem test
88
#
99
1010
#
1111
# Written by Roland Mainz <roland.mainz@nrubsig.org>
1212
#
1313
1414
#
1515
16-
# sequence 1...200
16+
# leaf function
17+
# ToDo: write function for branches which calls "make_seq_tree_leaf"
1820
set -o nounset
2021
compound c
22+
2128
integer c.i
2229
integer c.s
2330
integer c.e
2431
typeset c.cat_files=''
2832
29-
for ((c.i=0 ; c.i < 2000 ; )) ; do
33+
	for (( c.i=c.seqstart ; c.i < c.seqend ; )) ; do
34+
		(( c.s=c.i , c.e=c.i+c.seqincrement ))
3040
31-
((c.s=c.i , c.e=c.i+20))
41+
	printf '%s: %s\n' "${c.fp}" "${c.cat_files}"
32-
printf 'make_seq%d_%d:\n' c.s c.e
42+
	printf '\tcat %s\n' "${c.cat_files}"
3743
38-
if (( (++c.chunk_i % 5) == 0 )) ; then
44+
	return 0
39-
	printf 'chunk%d: %s\n' c.chunk_i "${c.targets}"
45+
}
4546
46-
done
47+
make_seq_tree_leaf 'xxx1' 0 10 100
4748
48-
printf 'all: %s\n' "${c.all_files}"
49+
printf 'all: xxx1\n'
5050
5151
# EOF.
5252

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at