`pbcopy` and `pbpaste` are one of my most-loved in the list. Dealing with some minified json, switching to iTerm, doing `pbpaste | json_pp | pbcopy` and having a clean output is _so_ nice.
macOS command-line tools you might not know about
11–20 of 454 posts
Re: macOS command-line tools you might not know about
#12`pbcopy` and `pbpaste` are one of my most-loved in the list. Dealing with some minified json, switching to iTerm, doing `pbpaste | json_pp | pbcopy` and having a clean output is _so_ nice.
Now, for your Mac example — if that's a specific pipeline you often use, you can write a Service menu entry to do it in place, without switching to a terminal.
Re: macOS command-line tools you might not know about
#13`pbcopy` and `pbpaste` are one of my most-loved in the list. Dealing with some minified json, switching to iTerm, doing `pbpaste | json_pp | pbcopy` and having a clean output is _so_ nice.
Re: macOS command-line tools you might not know about
#14Re: macOS command-line tools you might not know about
#15Re: macOS command-line tools you might not know about
#16networkQuality is something I really wish I knew about sooner.
Re: macOS command-line tools you might not know about
#17 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister
Manage file extended attributes (such as quarantine): xattr
Execute a script (AppleScript or JavaScript): osascript -e Re: macOS command-line tools you might not know about
#18Re: macOS command-line tools you might not know about
#19`pbcopy` and `pbpaste` are one of my most-loved in the list. Dealing with some minified json, switching to iTerm, doing `pbpaste | json_pp | pbcopy` and having a clean output is _so_ nice.
I have linux/macos-agnostic bash functions in my dotfiles that unify this to “clip” and “paste” (since “copy” is too close semantically to “cp”)
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/p...
Re: macOS command-line tools you might not know about
#20`pbcopy` and `pbpaste` are one of my most-loved in the list. Dealing with some minified json, switching to iTerm, doing `pbpaste | json_pp | pbcopy` and having a clean output is _so_ nice.
# This will remove Windows double-spaced empty lines from your copy/paste buffer
alias winlines="sed '/^$/{$!{N;s/\n//;};}'"
# pbw = [P]aste [B]uffer to fix [W]indows line endings
alias pbw="pbpaste | winlines | pbcopy"
Also - if you want `pbpaste` and `pbcopy` on Linux... # imitate MacOS's paste buffer copy/paste:
alias pbcopy='xsel --clipboard --input'
alias pbpaste='xsel --clipboard --output'