
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
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

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. Happy Birthday Charlie 16.6K posts
- 2. Good Tuesday 20.1K posts
- 3. #Worlds2025 21.4K posts
- 4. Bears 91K posts
- 5. Blake Snell 17.4K posts
- 6. Caleb 50.5K posts
- 7. Joji 34.1K posts
- 8. Jake Moody 14.2K posts
- 9. Jayden 23.2K posts
- 10. Commanders 53.1K posts
- 11. Swift 291K posts
- 12. Josh Allen 27.6K posts
- 13. #BearDown 2,451 posts
- 14. Treinen 4,768 posts
- 15. Ben Johnson 4,571 posts
- 16. Pentagon 66K posts
- 17. Turang 4,451 posts
- 18. Roki 6,176 posts
- 19. Conquered 28.9K posts
- 20. Bijan 34.1K 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.