C
CrazedNerd
Guest
I'm not discounting them as a resource altogether...sometimes they are your only friend when you're using command line tools...but i'm going to use a specific example just to show you that i'm not just being judgmental and unfair.
So here are the important parts of the man page for the "cut" command, don't worry it's a very short man page in comparison to some others:
So reading this in a straightforward and trusting way, you would think that the options "-b" and "-c" actually do something different, but they both just cause cut to print character columns to standard output using either a text file or something else as input. Here is an example, I'm doing both like "cut <whatever> | cat -n" just so you can see the line numbers. Here is the output for "cut -b 1":
Now, here is the output for "cut -c 1":
My point being that the "-b" option has NOTHING to do with bytes. The file I'm using has 72 bytes because there are exactly 72 ASCI characters in the file.
Also, consider this from the point of view of someone who has not tested the command:
How could anyone understand what that means just by reading it? The "list" here could mean an html list, or something like "bread, butter, oatmeal, bananas...". Such a horrible and cryptic man page! I feel like linux has had more than enough time to clean up its act on this.
So here are the important parts of the man page for the "cut" command, don't worry it's a very short man page in comparison to some others:
Code:
NAME
cut - remove sections from each line of files
SYNOPSIS
cut OPTION... [FILE]...
DESCRIPTION
Print selected parts of lines from each FILE to standard output.
With no FILE, or when FILE is -, read standard input.
Mandatory arguments to long options are mandatory for short options too.
-b, --bytes=LIST
select only these bytes
-c, --characters=LIST
select only these characters
-d, --delimiter=DELIM
use DELIM instead of TAB for field delimiter
-f, --fields=LIST
-n (ignored)
--complement
complement the set of selected bytes, characters or fields
-s, --only-delimited
do not print lines not containing delimiters
--output-delimiter=STRING
use STRING as the output delimiter the default is to use the input delimiter
-z, --zero-terminated
line delimiter is NUL, not newline
--help display this help and exit
--version
output version information and exit
Use one, and only one of -b, -c or -f. Each LIST is made up of one range, or many ranges
separated by commas. Selected input is written in the same order that it is read, and is written exactly
once. Each range is one of:
N N'th byte, character or field, counted from 1
N- from N'th byte, character or field, to end of line
N-M from N'th to M'th (included) byte, character or field
-M from first to M'th (included) byte, character or field
So reading this in a straightforward and trusting way, you would think that the options "-b" and "-c" actually do something different, but they both just cause cut to print character columns to standard output using either a text file or something else as input. Here is an example, I'm doing both like "cut <whatever> | cat -n" just so you can see the line numbers. Here is the output for "cut -b 1":
Code:
1 k
2 e
3 k
4 e
5 k
6 e
7 k
8 e
9 k
10 e
11 k
12 e
Now, here is the output for "cut -c 1":
Code:
1 k
2 e
3 k
4 e
5 k
6 e
7 k
8 e
9 k
10 e
11 k
12 e
My point being that the "-b" option has NOTHING to do with bytes. The file I'm using has 72 bytes because there are exactly 72 ASCI characters in the file.
Also, consider this from the point of view of someone who has not tested the command:
Code:
-c, --characters=LIST
select only these characters
How could anyone understand what that means just by reading it? The "list" here could mean an html list, or something like "bread, butter, oatmeal, bananas...". Such a horrible and cryptic man page! I feel like linux has had more than enough time to clean up its act on this.