ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
35057546 16.0 13.0 r 10/07 06:52 be_main.q cooper444 1 proj-unit1-dc-gen_rep unit1_rtl_28_05_18_FP1_pins_oreder_fix_w_sss
35062872 6.0 NA hqw 10/07 10:14 NA NA 8 proj-unit1-cf unit1_rtl_28_05_18_FP1_pins_oreder_fix
35062828 8.0 NA hqw 10/07 10:12 NA NA 8 proj-unit1-coc unit1_rtl_28_05_18_FP1_pins_oreder_fix
35062840 9.0 NA hqw 10/07 10:12 NA NA 8 proj-unit1-coo unit1_rtl_28_05_18_FP1_pins_oreder_fix
35012037 14.0 8.3 r 09/07 15:40 be_main.q cooper321 1 proj-unit1--INTERACTIVE unit1_rtl_28_05_18_FP1_pins_oreder_fix_w_sss
35062810 6.0 12.5 r 10/07 10:34 be_main.q cooper311 8 proj-unit1-po unit1_rtl_28_05_18_FP1_pins_oreder_fix
35062853 5.0 NA hqw 10/07 10:13 NA NA 8 proj-unit1-ra unit1_rtl_28_05_18_FP1_pins_oreder_fix
34949335 4.0 44.7 r 09/07 20:34 be_main.q cooper343 8 proj-unit3-ra unit3_rtl_06_06_18_FP2
34949379 4.0 41.8 r 10/07 00:41 be_main.q cooper358 8 proj-unit3-ra unit3_rtl_06_06_18_FP1
34949920 4.0 46.2 r 09/07 17:38 be_main.q cooper341 8 proj-unit3-ra unit3_rtl_06_06_18_FP3
34949378 4.0 NA hqw 08/07 11:09 NA NA 8 proj-unit3-ro unit3_rtl_06_06_18_FP2
34949384 4.0 NA hqw 08/07 11:10 NA NA 8 proj-unit3-ro unit3_rtl_06_06_18_FP1
34949933 4.0 NA hqw 08/07 11:23 NA NA 8 proj-unit3-ro unit3_rtl_06_06_18_FP3
35009686 22.0 36.1 r 09/07 14:45 be_main.q cooper440 8 proj-unit2-dc unit2_rtl_18_05_18r1_FP2_w_sss
35062135 35.0 16.4 r 10/07 09:39 be_main.q cooper423 1 proj-unit2-dcrep unit2_rtl_18_05_18r1_FP2
34951419 4.0 NA hqw 08/07 12:01 NA NA 8 proj-unit2-cf unit2_rtl_18_05_18r1_FP1_scripts_change
35063469 4.0 NA hqw 10/07 10:26 NA NA 8 proj-unit2-cf unit2_rtl_18_05_18r1_FP2
35063190 16.0 10.3 r 10/07 10:26 be_main.q cooper307 8 proj-unit2-Id unit2_rtl_18_05_18r1_FP2
35003338 14.0 20.4 r 09/07 11:26 be_main.q cooper348 1 proj-unit2--INTERACTIVE unit2_rtl_18_05_18r1_FP1_scripts_change
34951371 4.0 60.9 r 09/07 18:57 be_main.q cooper348 8 proj-unit2-ro unit2_rtl_18_05_18r1_FP1_scripts_change
35063418 4.0 NA hqw 10/07 10:25 NA NA 8 proj-unit2-ro unit2_rtl_18_05_18r1_FP2
I want to ask how can I sort twice in same command line in tcsh.
First I want to sort by name in column 10 and then by column 7 but keeping column 10 sorted.
I tried to use below command but without success
sort defaults to end-of-record if no termination field is included, so the OP has the right idea, but why -k11 ?.
I know nothing of tcsh, but I also don't understand the need for awk.
sort defaults to end-of-record if no termination field is included, so the OP has the right idea, but why -k11 ?.
I know nothing of tcsh, but I also don't understand the need for awk.
I had to remove 2 rows from top this is why I use awk and then sort.
I want to ask how can I sort twice in same command line in tcsh.
First I want to sort by name in column 10 and then by column 7 but keeping column 10 sorted.
That seems a contradictory specification...if you want both col 7 and col 10 sorted, but with col 10 as the high order, don't you need to sort by 7 first, then 10?
I'd have to play with it some, but it's past midnight. I'll check back in the morning.
I'd use sort, not awk.
I'm not sure which shell is being used is a factor, either.
As you can see in my open thread,
All name with the word unit* (column 10) sorted without effect in column 7 (name: be_main.q)
both columns keep sorted.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.