mirror of
https://github.com/xmengnet/the-art-of-command-line.git
synced 2024-12-24 03:56:28 +08:00
parent
f1a99aa976
commit
eab7f29c28
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue