pastebin - collaborative debugging tool
nrubsig.kpaste.net RSS

Difference between
modified post 7ae by Anonymous on Wed 28th Feb 2024 15:08
original post aa00dd04a by Anonymous on Wed 28th Feb 2024 15:00
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
#
7-
# This is intenended to be a filesystem test
7+
# This is intended to be a filesystem test
88
#
99
1010
#
1111
# Written by Roland Mainz <roland.mainz@nrubsig.org>
1212
#
1313
1414
#
1515
1616
# leaf function
1717
# ToDo: write function for branches which calls "make_seq_tree_leaf"
1818
function make_seq_tree_leaf
1919
{
2020
	set -o nounset
2121
	compound c
2222
2323
	typeset c.fp=$1 # prefix
2424
	integer c.seqstart=$2
2525
	integer c.seqincrement=$3
2626
	integer c.seqend=$4
2727
2828
	integer c.i
2929
	integer c.s
3030
	integer c.e
3131
	typeset c.cat_files=''
3232
3333
	for (( c.i=c.seqstart ; c.i < c.seqend ; )) ; do
3434
		(( c.s=c.i , c.e=c.i+c.seqincrement ))
3535
		printf '%sseq%d_%d:\n' "${c.fp}" c.s c.e
3636
		printf '\tseq %d 1 %d >"%sseq%d_%d"\n' c.s c.e "${c.fp}" c.s c.e
3737
		c.cat_files+="$(printf ' %sseq%d_%d' "${c.fp}" c.s c.e)"
3838
		(( c.i=c.e ))
3939
	done
4040
4141
	printf '%s: %s\n' "${c.fp}" "${c.cat_files}"
4242
	printf '\tcat %s\n' "${c.cat_files}"
4343
4444
	return 0
4545
}
4646
47-
make_seq_tree_leaf 'xxx1' 0 10 100
47+
make_seq_tree_leaf 'xxx0_50' 0 10 50
48+
make_seq_tree_leaf 'xxx51_100' 1 10 100
4849
49-
printf 'all: xxx1\n'
50+
printf 'all: xxx0_50 xxx51_100\n'
5051
5152
# EOF.
5253

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