Changeset 4278
- Timestamp:
- 01/18/10 03:02:06 (3 years ago)
- Location:
- zzuf/trunk
- Files:
-
- 2 edited
-
doc/zzcat.1.in (modified) (2 diffs)
-
src/zzcat.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
zzuf/trunk/doc/zzcat.1.in
r4274 r4278 3 3 zzcat \- concatenate files using different instruction sequences 4 4 .SH SYNOPSIS 5 \fBzzcat\fR [\fB\-AbeEntTv\fR] [\fB\-x\fR \fIsequence\fR] [\fIFILE\fR]... 5 \fBzzcat\fR [\fB\-AbeEntTv\fR] [\fB\-r\fR \fIloops\fR] 6 [\fB\-x\fR \fIsequence\fR] [\fIFILE\fR]... 6 7 .br 7 8 \fBzzcat \-l\fR | \fB\-\-list\fR … … 34 35 \fB\-n\fR, \fB\-\-number\fR 35 36 Number all output lines. 37 .TP 38 \fB\-r\fR, \fB\-\-repeat\fR=\fIloops\fR 39 Concatenate all files \fIloops\fR times. 36 40 .TP 37 41 \fB\-t\fR -
zzuf/trunk/src/zzcat.c
r4273 r4278 63 63 64 64 /* Global parameters */ 65 static int repeat = 1; 65 66 static char escape_tabs = 0; 66 67 static char escape_ends = 0; … … 86 87 for (;;) 87 88 { 88 #define OPTSTR "+AbeEn stTvx:lhV"89 #define OPTSTR "+AbeEnr:stTvx:lhV" 89 90 #define MOREINFO "Try `%s --help' for more information.\n" 90 91 int option_index = 0; … … 95 96 { "show-ends", 0, NULL, 'E' }, 96 97 { "number", 0, NULL, 'n' }, 98 { "repeat", 1, NULL, 'r' }, 97 99 { "squeeze-blank", 0, NULL, 's' }, 98 100 { "show-tabs", 0, NULL, 'T' }, … … 125 127 case 'n': /* --number */ 126 128 number_lines = 1; 129 break; 130 case 'r': /* --repeat */ 131 repeat = atoi(optarg); 127 132 break; 128 133 case 's': /* --squeeze-blank */ … … 165 170 } 166 171 167 for (i = myoptind; i < argc; i++) 168 { 169 int ret = run(sequence, argv[i]); 170 if (ret) 171 return ret; 172 } 172 while (repeat-- > 0) 173 for (i = myoptind; i < argc; i++) 174 { 175 int ret = run(sequence, argv[i]); 176 if (ret) 177 return ret; 178 } 173 179 174 180 return EXIT_SUCCESS; … … 789 795 printf(" -E, --show-ends display $ at end of each line\n"); 790 796 printf(" -n, --number number all output lines\n"); 797 printf(" -r, --repeat=<loops> concatenate command line files <loops> times\n"); 791 798 printf(" -t equivalent to -vT\n"); 792 799 printf(" -T, --show-tabs display TAB characters as ^I\n"); 793 800 printf(" -v, --show-nonprinting use ^ and M- notation, except for LFD and TAB\n"); 794 printf(" -x, --execute <sequence> execute commands in <sequence>\n");801 printf(" -x, --execute=<sequence> execute commands in <sequence>\n"); 795 802 printf(" -l, --list list available program functions\n"); 796 803 printf(" -h, --help display this help and exit\n");
Note: See TracChangeset
for help on using the changeset viewer.
