From 4750ccc6eb823a1d4e9dabac05d08a0dadda2d55 Mon Sep 17 00:00:00 2001 From: danasmera Date: Fri, 17 Jul 2015 01:41:12 -0400 Subject: [PATCH 1/4] fix: useless use of cat --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 692d1b4..b5acf04 100644 --- a/README.md +++ b/README.md @@ -288,7 +288,7 @@ A few examples of piecing together commands: - Say you have a text file, like a web server log, and a certain value that appears on some lines, such as an `acct_id` parameter that is present in the URL. If you want a tally of how many requests for each `acct_id`: ```sh - cat access.log | egrep -o 'acct_id=[0-9]+' | cut -d= -f2 | sort | uniq -c | sort -rn + egrep -o 'acct_id=[0-9]+' access.log | cut -d= -f2 | sort | uniq -c | sort -rn ``` - Run this function to get a random tip from this document (parses Markdown and extracts an item): From b9d9ac8ff6996e14644ec159c36c631d34d4b607 Mon Sep 17 00:00:00 2001 From: danasmera Date: Fri, 17 Jul 2015 01:46:56 -0400 Subject: [PATCH 2/4] Get Linux distribution information --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index b5acf04..b880758 100644 --- a/README.md +++ b/README.md @@ -302,6 +302,9 @@ A few examples of piecing together commands: } ``` +- Find out the name,version and codename of your Linux OS distribution with Python +`python -c 'from platform import dist; print dist()'` + ## Obscure but useful From d3a449210750e52452a9ae3d9815615e7db980a8 Mon Sep 17 00:00:00 2001 From: danasmera Date: Fri, 17 Jul 2015 01:48:13 -0400 Subject: [PATCH 3/4] Add new line --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b880758..4ec15e0 100644 --- a/README.md +++ b/README.md @@ -303,6 +303,7 @@ A few examples of piecing together commands: ``` - Find out the name,version and codename of your Linux OS distribution with Python + `python -c 'from platform import dist; print dist()'` From e5e9a384815e07df3d888e3be1d28ef87aee8c93 Mon Sep 17 00:00:00 2001 From: danasmera Date: Sun, 19 Jul 2015 11:00:39 -0400 Subject: [PATCH 4/4] Add sysctl command --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4ec15e0..71f28e3 100644 --- a/README.md +++ b/README.md @@ -439,6 +439,7 @@ A few examples of piecing together commands: - `fortune`, `ddate`, and `sl`: um, well, it depends on whether you consider steam locomotives and Zippy quotations "useful" +- `sysctl`: view and change kernel parameters at runtime. ## MacOS X only