‘sort’ produces output in a weird order
Consider the following input to sort:
Consider the following input to sort:
I’m facing a huge 4-columns file. I’d like to display the sorted file in stdout based on its 3rd column:
I have a large file in the following format:
The two examples in the title produce very different results. The first (sort -k2,2 -nk6,6 foo) brings back the following results:
I am trying to sort some simple pipe-delimited data. However, sort isn’t actually sorting. It moves my header row to the bottom, but my two rows starting with 241 are being split by a row starting with 24.
I really enjoying using control+r to recursively search my command history. I’ve found a few good options I like to use with it:
I have a PC with Intel(R) Pentium(R) CPU G640 @ 2.80 GHz and 8 GB of RAM. I am running Scientific Linux 6.5 on it with EXT3 filesystem.
I have a line (or many lines) of numbers that are delimited by an arbitrary character. What UNIX tools can I use to sort each line’s items numerically, retaining the delimiter?
I like being able to name files and directories with an underscore prefix if it’s something I want to keep separate from other files and directories at the same level. On Windows and Mac, for example, prefixing a file with an underscore sorts it to the top, in front of files starting with an alphanumeric character.
I have this input: