Timeline for get multiple column from a large file that conclude two thousand column
Current License: CC BY-SA 4.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 28, 2021 at 15:08 | comment | added | Sundeep |
you can also use paste -sd, instead of tr+sed
|
|
| Jul 28, 2021 at 12:22 | history | edited | terdon♦ | CC BY-SA 4.0 |
added 3 characters in body
|
| Jul 28, 2021 at 12:20 | vote | accept | Xiaolong Liang | ||
| Jul 28, 2021 at 11:58 | comment | added | terdon♦ |
@Paul_Pedant thanks, I switched to iterating using indices which should ensure we at least use whatever order was in file2.
|
|
| Jul 28, 2021 at 11:58 | history | edited | terdon♦ | CC BY-SA 4.0 |
added 405 characters in body
|
| Jul 28, 2021 at 10:55 | comment | added | terdon♦ | @Paul_Pedant yes, I think it just happens to work in this case because it's a tiny array. Thanks, I keep forgetting this awk foible of not keeping the order. I'll fix in a minute. | |
| Jul 28, 2021 at 10:42 | comment | added | Paul_Pedant |
I'm not clear why that works: specifically, why column order is maintained. "column in .." does not impose an order on the sequence of keys. GNU/awk does seem to report small numeric keys in order, but I suspect that breaks down for larger keys, and the order is entirely random in other awks. BEGIN { PROCINFO["sorted_in"] = "@ind_num_asc"; } might fix it.
|
|
| Jul 28, 2021 at 10:42 | history | edited | terdon♦ | CC BY-SA 4.0 |
added 1910 characters in body
|
| Jul 28, 2021 at 10:24 | history | answered | terdon♦ | CC BY-SA 4.0 |