19,007 reputation
23971
bio website
location United States
age
visits member for 2 years, 11 months
seen 6 hours ago

Debian user, GNU/Linux enthusiast, FLOSS supporter, hobby developer.


Jun
5
comment awk command for parsing a file
@user3138373 Using the POSIX spec, the Extended Description says, "An awk program is composed of pairs of the form: pattern { action }. Either the pattern or the action (including the enclosing brace characters) can be omitted." The 1 is simply a pattern, and the action is omitted. Further, "... a missing action shall be equivalent to: { print }."
Jun
5
revised awk command for parsing a file
respond to OFS comment
Jun
5
answered awk command for parsing a file
Jun
5
comment awk command for parsing a file
This sounds quite trivial in awk.
Jun
4
comment How to get previous year and previous month in solaris 8
As far as I know only the GNU version of date has a -d option that accepts input like last month or last year.
Jun
3
comment dd: 'bs', 'count' & 'seek'
Try the GNU documentation for dd or the POSIX version.
Jun
3
comment Exiting a '&pattern' search in less
& with an empty pattern should work. What version of less do you have? Have you checked man less?
Jun
3
comment Why is Aircrack-ng able to read and use a .lst file that Leafpad couldn't in a reasonable time?
@just There's not enough information to answer that for sure without knowing the specific hardware and software configuration being used. I would bet that most password protection schemes in use today are more CPU-bound than memory bound.
May
30
comment POSIX usage standards for requiring at least one optional arg
The easiest way around this is to make both optional, in one of two ways: (a) provide a default action for the no argument case or (b) print an error message and exit. As far as I can tell, the POSIX Utility Conventions do not have a way to express the "one or more of the following set, but at most one of each" requirement. You could also imitate dd, and just call it field_id which you explain in the details.
May
29
comment How can I get the first column of a 300GB txt file?
I would guess OP is using mawk which is a popular default implementation of awk on many distributions and does indeed have the 32767 field limit.
May
29
comment How can I get the first column of a 300GB txt file?
@JovanAndonov The * is greedy and since . matches everything, you will just get /ns/everything from first/ns/to the end of the line.
May
27
awarded  Guru
May
27
comment Some puzzles of how to close file descriptors on sh or bash
See also this question: unix.stackexchange.com/q/131801/9537
May
27
comment shell or python script to transpose rows to columns
Try unix.stackexchange.com/q/79642/9537, and stackoverflow.com/q/1729824/855954
May
26
revised compare columns in a one file and print the count of matches
deleted 6 characters in body
May
26
revised grep and command-line variable substitution
deleted 176 characters in body; edited title
May
26
comment compare columns in a one file and print the count of matches
@RincyRaphael I am only answering what you have in your question. If you want something put it in your question. Your question says "Expected output: 2" so that is what I gave you. If you want something else ask for it. I can not read your mind.
May
26
revised compare columns in a one file and print the count of matches
deleted 63 characters in body
May
26
revised compare columns in a one file and print the count of matches
remove unnecessary grep
May
26
revised compare columns in a one file and print the count of matches
added 17 characters in body