
Unix tool tip
@UnixToolTip
Tips on Unix utilities and related topics from @JohnDCook.
คุณอาจชื่นชอบ
'The enjoyment of one's tools is an essential ingredient of successful work.' -- Donald E. Knuth
When giving numeric arguments to the find utility, + means greater than and - means less than. e.g. +7 means greater than 7.
In Emacs, to send the contents of a region to a shell command, use M-|.
"no Shakespeare yet -- only syntactically correct Bash scripts"

Legend has it gym memberships are particularly hard to cancel here because nobody knows how to exit

'With only s and d you should probably find a use for sed once a week.' -- @WilsonEricN
Replace string in a huge (70GB), one line, text file unix.stackexchange.com/questions/4136…
Trim leading and trailing whitespace: sed -i 's/^[ \t]*//;s/[ \t]*$//' somefile
Example from my latest blog post: sample a file with replacement, choosing 12 items: shuf -n 12 -r file.txt
Boolean operators in find: -not, -or. There's no 'and' because 'and' is implicit when two requirements are listed.
Seven habits of effective text editing moolenaar.net/habits.html // general principles, examples with Vim
Can show all environment variables with printenv. Probably want to pipe to less.
Repeat a shell command, replacing all instances of a word with something new johndcook.com/blog/2022/10/2…
Trim leading whitespace: sed -i 's/^[ \t]*//' somefile
'A successful software tool is one that was used to do something undreamed of by its author.' -- Stephen Johnson
Limit find's depth of search with the -maxdepth option.
If you only want to know whether two files differ, not how they differ, use diff -q (or --brief).
Awk can use a pair of regular expressions as a range, just like sed. In both languages, /foo/,/bar/ matches the same lines.
United States เทรนด์
- 1. Yamamoto 48.5K posts
- 2. #DWTS 44.5K posts
- 3. halsey 9,251 posts
- 4. Growth Path 1,676 posts
- 5. #FlyTogether 2,932 posts
- 6. Young Republicans 77.2K posts
- 7. Jared Butler N/A
- 8. Kreider 1,337 posts
- 9. #TexasHockey 3,436 posts
- 10. #MOST_WANTED_IN_CHICAGO 1,277 posts
- 11. Ohtani 14.2K posts
- 12. Cuffem 2,733 posts
- 13. #RHOSLC 4,848 posts
- 14. TOKYO NARITA N/A
- 15. Jarry N/A
- 16. Tami 4,618 posts
- 17. Lucia 63.7K posts
- 18. Will Richard 2,686 posts
- 19. bush 40.8K posts
- 20. Ayton 2,534 posts
คุณอาจชื่นชอบ
-
Computer Science
@CompSciFact -
Regular Expression
@RegexTip -
Probability Fact
@ProbFact -
Algebra Etc.
@AlgebraFact -
Data Science Fact
@DataSciFact -
Scientific Python
@SciPyTip -
Analysis Fact
@AnalysisFact -
Ubuntu
@ubuntu -
The Linux Foundation
@linuxfoundation -
nixCraft 🐧
@nixcraft -
Differential Eqns
@diff_eq -
Topology Fact
@TopologyFact -
Logic & Applications
@LogicPractice -
Red Hat
@RedHat -
Docker
@Docker
Something went wrong.
Something went wrong.