aboutsummaryrefslogtreecommitdiff
path: root/coreutils/cut.c
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2000-07-14 23:28:47 +0000
committerMatt Kraai <kraai@debian.org>2000-07-14 23:28:47 +0000
commit3bd8bd89ee9d0b65bf279e1ecad826a5f2f0a217 (patch)
tree6a217bf17e7c00e98a47f657015535f21b53cedd /coreutils/cut.c
parent464c5de00d3dfb5f01e866f703d95bbb2bb9443c (diff)
downloadbusybox-w32-3bd8bd89ee9d0b65bf279e1ecad826a5f2f0a217.tar.gz
busybox-w32-3bd8bd89ee9d0b65bf279e1ecad826a5f2f0a217.tar.bz2
busybox-w32-3bd8bd89ee9d0b65bf279e1ecad826a5f2f0a217.zip
Don't use strings directly in calls to usage(). This is in preparation
for their extraction to a separate file.
Diffstat (limited to 'coreutils/cut.c')
-rw-r--r--coreutils/cut.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/coreutils/cut.c b/coreutils/cut.c
index 783d526a5..08b4586a4 100644
--- a/coreutils/cut.c
+++ b/coreutils/cut.c
@@ -206,6 +206,19 @@ void cut()
206 } 206 }
207} 207}
208 208
209const char cut_usage[] =
210 "cut [OPTION]... [FILE]...\n"
211#ifndef BB_FEATURE_TRIVIAL_HELP
212 "\nPrints selected fields from each input FILE to standard output.\n\n"
213 "Options:\n"
214 "\t-b LIST\tOutput only bytes from LIST\n"
215 "\t-c LIST\tOutput only characters from LIST\n"
216 "\t-d CHAR\tUse CHAR instead of tab as the field delimiter\n"
217 "\t-s\tOnly output Lines if the include DELIM\n"
218 "\t-f N\tPrint only these fields\n"
219 "\t-n\tIgnored\n"
220#endif
221 ;
209 222
210int cut_main(int argc, char **argv) 223int cut_main(int argc, char **argv)
211{ 224{
@@ -213,18 +226,7 @@ int cut_main(int argc, char **argv)
213 int numberFilenames = 0; 226 int numberFilenames = 0;
214 227
215 if (argc == 1 || strcmp(argv[1], dash_dash_help)==0) 228 if (argc == 1 || strcmp(argv[1], dash_dash_help)==0)
216 usage( "cut [OPTION]... [FILE]...\n" 229 usage(cut_usage);
217#ifndef BB_FEATURE_TRIVIAL_HELP
218 "\nPrints selected fields from each input FILE to standard output.\n\n"
219 "Options:\n"
220 "\t-b LIST\tOutput only bytes from LIST\n"
221 "\t-c LIST\tOutput only characters from LIST\n"
222 "\t-d CHAR\tUse CHAR instead of tab as the field delimiter\n"
223 "\t-s\tOnly output Lines if the include DELIM\n"
224 "\t-f N\tPrint only these fields\n"
225 "\t-n\tIgnored\n"
226#endif
227 );
228 230
229 while (i < argc) { 231 while (i < argc) {
230 if (argv[i][0] == '-') { 232 if (argv[i][0] == '-') {