C-shell puzzles

tim at ISM780B.UUCP tim at ISM780B.UUCP
Thu Nov 21 09:00:00 AEST 1985


Here's another good C shell quirk:

	$ echo foo
	foo
	$ repeat 3 echo foo
	foo
	foo
	foo
	$ repeat 3 repeat 3 echo foo
	foo
	foo
	foo
	foo
	foo
	$ repeat $N repeat $M echo foo        # $N and $M are integers
	[ $N + $M - 1 foo's ]
	$ repeat $N1 repeat $N2 ... repeat $Nk echo foo
	[ $N1 + $N2 + ... + $Nk - k + 1 foo's ]
	$

						Tim Smith
						ihnp4!cithep!tim
						ima!ism780!tim



More information about the Comp.unix.wizards mailing list