|
|
1.1 ! root 1: .th SHIFT I 8/21/73 ! 2: .sh NAME ! 3: shift \*- adjust Shell arguments ! 4: .sh SYNOPSIS ! 5: .bd shift ! 6: .sh DESCRIPTION ! 7: .it Shift ! 8: is used in Shell command files to shift the ! 9: argument list left by 1, ! 10: so that old ! 11: .bd $2 ! 12: can now be referred to by ! 13: .bd $1 ! 14: and so forth. ! 15: .it Shift ! 16: is useful to iterate over several arguments ! 17: to a command file. ! 18: For example, the command file ! 19: .s3 ! 20: .lp +5 0 ! 21: : loop ! 22: .br ! 23: if $1x = x exit ! 24: .br ! 25: pr \*-3 $1 ! 26: .br ! 27: shift ! 28: .br ! 29: goto loop ! 30: .s3 ! 31: .i0 ! 32: prints each of its arguments in 3-column format. ! 33: .s3 ! 34: .it Shift ! 35: is executed within the Shell. ! 36: .sh "SEE ALSO" ! 37: sh (I) ! 38: .sh BUGS
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.