Posts

Showing posts from January 18, 2019

Linux terminal: Keyword highlighting similar to MobaXTerm without piping

Image
Clash Royale CLAN TAG #URR8PPP 0 When I SSH into a Linux machine from Windows using MobaXTerm, I get the benefit of syntax highlighting (https://mobaxterm.mobatek.net/features.html --> see Syntax highlighting in terminal ). It automatically highlights keywords like error , pass , failed , missing , etc. I find this extremely useful when executing scripts that spew out a lot of debugging text -- the highlighting has helped me to notice errors that I have missed for several months due to the verbosity. I know that programs like VIM have syntax highlighting, but it's at a program level, and is language (or file-type) specific. I'm looking for the same highlighting as MobaXTerm, but at a Linux terminal level. Currently, I have to switch to Windows and SSH to the Linux machine just that have that feature, which is a chore. It would be nice if there is a plugin for the terminal. Syntax highlighting in the terminal suggests few solutions, but requires the output to b

Find the min and max value of column 3 and print whole row

Image
Clash Royale CLAN TAG #URR8PPP 0 I have huuuge sets of data consisting of 3 columns. I'd like to be able to find max and min values in the third column (there is mix of zeros and then negative values, so I want to find max negative and min negative value) and then print that particular row. How can I do that? example input: -6.4 -3.6 -0.00 -6.4 -3.5 -0.00 -6.4 -3.5 -0.00 -6.4 -3.5 -0.00 . . . -2.4 -1.6 -14.50 -2.4 -1.5 -14.49 -2.4 -1.5 -14.49 -2.4 -1.5 -14.49 . . . -5.4 -2.6 -4.52 -5.4 -2.6 -4.53 -5.4 -2.6 -4.50 -5.4 -2.6 -0.00 -5.4 -2.6 -0.00 output: min: -2.4 -1.6 -14.50 max: -5.4 -2.6 -4.50 text-processing numeric-data share | improve this question edited Jan 5 at 12:31 Jeff Schaller 39.5k 10 54 126 asked Jan 5 at 3:43 LonelyStudent LonelyStudent 3 2 Give an example of the data and the expected output. – Nasir Riley Jan 5 at 3:55 I've edited, hope it's clear now! – LonelyStudent Jan 5