pastebin - collaborative debugging tool
nrubsig.kpaste.net RSS

Difference between
modified post cecb by Anonymous on Thu 18th Jul 2024 23:38
original post 8cc3e by Anonymous on Thu 18th Jul 2024 20:53
Download diff
Show old version | new version | both versions

    
11
#!/bin/ksh93
22
33
#
44
# make_numtree1.ksh93 - build makefile to generate number sequence
55
#
66
77
function make_number_seq
88
{
99
	nameref out_maketarget=$1
1010
	integer start_i=$2
1111
	integer stop_i=$3
1212
	integer i
1313
	typeset -a make_targets
1414
1515
	for ((i=start_i ; i < stop_i ; i++ )) ; do
1616
		printf 'i_%d:\n' i
1717
		printf '\tprintf "%d\\n" >"i_%d"\n' i i
18-
		make_targets+=( "i_$i " )
18+
		make_targets+=( "i_$i" )
1919
	done
2020
2121
	out_maketarget="i_${start_i}_${stop_i}"
2222
	printf 'i_%d_%d: %s\n' start_i stop_i "${make_targets[*]}"
2423
24+
	printf '\tcat '
2727
2928
29+
	return 0
3131
32+
typeset make_target
3433
34+
make_number_seq make_target 0 100
3535
36-
36+
printf 'all: %s\n' "$make_target"
37-
37+
# EOF.
3838
3939

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