User Tools

Site Tools


apply_unix_commands_to_all_but_the_first_line

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
apply_unix_commands_to_all_but_the_first_line [2022/08/12 15:16] – [How I came across it] rajuapply_unix_commands_to_all_but_the_first_line [2022/08/12 17:29] (current) – [Situation] raju
Line 1: Line 1:
 ===== Apply unix commands to all but the first line ===== ===== Apply unix commands to all but the first line =====
 ==== Situation ==== ==== Situation ====
-Let's say we want to sort a series of numbers in descending order but keep the header at the top. For example, given+Let's say we want to sort a series of numbers in ascending order but keep the header at the top. For example, given
 <code> <code>
 % echo -e "value\n8\n2\n6\n3" % echo -e "value\n8\n2\n6\n3"
Line 129: Line 129:
  
 ==== How I came across it ==== ==== How I came across it ====
-I came across it while reading the book "Data Science at the Command Line" (2nd Edition) by Jeroen Janssens (https://smile.amazon.com/Data-Science-Command-Line-Explore/dp/1492087912). The book is available for free at https://datascienceatthecommandline.com/2e/The 'body' and 'header' commands are discussed in https://datascienceatthecommandline.com/2e/chapter-5-scrubbing-data.html#bodies-and-headers-and-columns-oh-my .+The 'body' and 'header' commands are discussed in the book "Data Science at the Command Line" (2nd Edition) by Jeroen Janssens (https://smile.amazon.com/Data-Science-Command-Line-Explore/dp/1492087912). It is available for free at https://datascienceatthecommandline.com/2e/See for example https://datascienceatthecommandline.com/2e/chapter-5-scrubbing-data.html#bodies-and-headers-and-columns-oh-my .
  
 ==== Close but no cigar ==== ==== Close but no cigar ====
apply_unix_commands_to_all_but_the_first_line.txt · Last modified: 2022/08/12 17:29 by raju