| 149 | }; |
| 150 | |
| 151 | void |
| 152 | usage (int status) |
| 153 | { |
| 154 | if (status != EXIT_SUCCESS) |
| 155 | emit_try_help (); |
| 156 | else |
| 157 | { |
| 158 | printf (_("\ |
| 159 | Usage: %s [OPTION]... [INPUT [OUTPUT]]\n\ |
| 160 | "), |
| 161 | program_name); |
| 162 | fputs (_("\ |
| 163 | Filter adjacent matching lines from INPUT (or standard input),\n\ |
| 164 | writing to OUTPUT (or standard output).\n\ |
| 165 | \n\ |
| 166 | With no options, matching lines are merged to the first occurrence.\n\ |
| 167 | "), stdout); |
| 168 | |
| 169 | emit_mandatory_arg_note (); |
| 170 | |
| 171 | oputs (_("\ |
| 172 | -c, --count\n\ |
| 173 | prefix lines by the number of occurrences\n\ |
| 174 | ")); |
| 175 | oputs (_("\ |
| 176 | -d, --repeated\n\ |
| 177 | only print duplicate lines, one for each group\n\ |
| 178 | ")); |
| 179 | oputs (_("\ |
| 180 | -D\n\ |
| 181 | print all duplicate lines\n\ |
| 182 | ")); |
| 183 | oputs (_("\ |
| 184 | --all-repeated[=METHOD]\n\ |
| 185 | like -D, but allow separating groups with an empty line;\n\ |
| 186 | METHOD={none(default),prepend,separate}\n\ |
| 187 | ")); |
| 188 | oputs (_("\ |
| 189 | -f, --skip-fields=N\n\ |
| 190 | avoid comparing the first N fields\n\ |
| 191 | ")); |
| 192 | oputs (_("\ |
| 193 | --group[=METHOD]\n\ |
| 194 | show all items, separating groups with an empty line;\n\ |
| 195 | METHOD={separate(default),prepend,append,both}\n\ |
| 196 | ")); |
| 197 | oputs (_("\ |
| 198 | -i, --ignore-case\n\ |
| 199 | ignore differences in case when comparing\n\ |
| 200 | ")); |
| 201 | oputs (_("\ |
| 202 | -s, --skip-chars=N\n\ |
| 203 | avoid comparing the first N characters\n\ |
| 204 | ")); |
| 205 | oputs (_("\ |
| 206 | -u, --unique\n\ |
| 207 | only print unique lines\n\ |
| 208 | ")); |
no test coverage detected