From 54d5c0260311602c5383b6b90c52af3f21b26def Mon Sep 17 00:00:00 2001 From: vitzli Date: Fri, 19 Jun 2015 17:22:31 +0600 Subject: [PATCH 1/6] Add units program --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 43a1393..946b5f0 100644 --- a/README.md +++ b/README.md @@ -402,6 +402,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" +- `units`: unit conversion and calculation program, converts furlongs per fortnights to twips per blinks, `/usr/share/units/definitions.units` worth reading by itself. ## More resources From e6e0b70bd733e448fdda0d6bffb13704e7f2dfb2 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Sat, 20 Jun 2015 09:12:15 -0700 Subject: [PATCH 2/6] Tweak units contribution. Update to #80 --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 093fe9a..7836a3c 100644 --- a/README.md +++ b/README.md @@ -364,6 +364,8 @@ A few examples of piecing together commands: - `split `and `csplit`: splitting files +- `units`: unit conversions and calculations; converts furlongs per fortnight to twips per blink (see also `/usr/share/units/definitions.units`) + - `7z`: high-ratio file compression - `ldd`: dynamic library info @@ -418,7 +420,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" -- `units`: unit conversion and calculation program, converts furlongs per fortnights to twips per blinks, `/usr/share/units/definitions.units` worth reading by itself. + ## More resources From f1a99aa976fdd032c916a12c98b42da385414069 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Sat, 20 Jun 2015 09:53:07 -0700 Subject: [PATCH 3/6] Add wiki-style license. --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7836a3c..1e02c48 100644 --- a/README.md +++ b/README.md @@ -421,7 +421,6 @@ 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" - ## More resources - [awesome-shell](https://github.com/alebcay/awesome-shell): A curated list of shell tools and resources. @@ -431,3 +430,10 @@ A few examples of piecing together commands: ## Disclaimer With the exception of very small tasks, code is written so others can read it. With power comes responsibility. The fact you *can* do something in Bash doesn't necessarily mean you should! ;) + + +## License + +[![Creative Commons License](https://i.creativecommons.org/l/by-sa/4.0/88x31.png)](http://creativecommons.org/licenses/by-sa/4.0/) + +This work is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International Licene](http://creativecommons.org/licenses/by-sa/4.0/). From eab7f29c2852196b1e0bf60404cab13dbcbf0a78 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Sat, 20 Jun 2015 10:10:06 -0700 Subject: [PATCH 4/6] Add diff, patch, and diffstat. Fixes #36. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 1e02c48..8097227 100644 --- a/README.md +++ b/README.md @@ -196,10 +196,14 @@ Notes: - If you ever need to write a tab literal in a command line in Bash (e.g. for the -t argument to sort), press **ctrl-v** **[Tab]** or write `$'\t'` (the latter is better as you can copy/paste it). +- The standard tools for patching source code are `diff` and `patch`. See also `diffstat` for summary statistics of a diff. Note `diff -r` works for entire directories. Use `diff -r tree1 tree2 | diffstat` for a summary of changes. + - For binary files, use `hd` for simple hex dumps and `bvi` for binary editing. - Also for binary files, `strings` (plus `grep`, etc.) lets you find bits of text. +- For binary diffs (delta compression), use `xdelta3`. + - To convert text encodings, try `iconv`. Or `uconv` for more advanced use; it supports some advanced Unicode things. For example, this command lowercases and removes all accents (by expanding and dropping them): ```sh uconv -f utf-8 -t utf-8 -x '::Any-Lower; ::Any-NFD; [:Nonspacing Mark:] >; ::Any-NFC; ' < input.txt > output.txt From 80ba0c126dbc9338176cb6c0e0362ad9a7228f26 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Sat, 20 Jun 2015 12:33:11 -0700 Subject: [PATCH 5/6] Clarify scope to include non-standard packages. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8097227..edad6fd 100644 --- a/README.md +++ b/README.md @@ -29,10 +29,11 @@ Scope: - This guide is both for beginners and the experienced. The goals are *breadth* (everything important), *specificity* (give concrete examples of the most common case), and *brevity* (avoid things that aren't essential or digressions you can easily look up elsewhere). Every tip is essential in some situation or significantly saves time over alternatives. - This is written for Linux. Many but not all items apply equally to MacOS (or even Cygwin). - The focus is on interactive Bash, though many tips apply to other shells and to general Bash scripting. +- It includes both "standard" Unix commands as well as ones that require special package installs -- so long as they are important enough to merit inclusion. Notes: -- To keep this to one page, content is implicitly included by reference. You're smart enough to look up more detail elsewhere once you know the idea or command to Google. Use `apt-get`/`yum`/`dnf`/`brew` (as appropriate) to install new programs. +- To keep this to one page, content is implicitly included by reference. You're smart enough to look up more detail elsewhere once you know the idea or command to Google. Use `apt-get`/`yum`/`dnf`/`pip`/`brew` (as appropriate) to install new programs. - Use [Explainshell](http://explainshell.com/) to get a helpful breakdown of what commands, options, pipes etc. do. From 6534752694c2cee24460b4ffdbfd727fae4aa0b5 Mon Sep 17 00:00:00 2001 From: "Wael M. Nasreddine" Date: Sun, 21 Jun 2015 00:31:43 -0700 Subject: [PATCH 6/6] remove a duplicator `for` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index edad6fd..39bef86 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ Notes: - Use `nohup` or `disown` if you want a background process to keep running forever. -- Check what processes are listening via `netstat -lntp` or `ss -plat` (for TCP; add `-u` for for UDP). +- Check what processes are listening via `netstat -lntp` or `ss -plat` (for TCP; add `-u` for UDP). - See also `lsof` for open sockets and files.