Earlier quoted context omitted.
> cat textfile.txt > looks like its comma delimited. Interesting; why wouldn't you use `head`? Who knows how big textfile.txt is?
Don't forget to pipe head into 'cat -v'... that text file could contain _anything_!
macOS command-line tools you might not know about
251–260 of 454 posts
Re: macOS command-line tools you might not know about
#252I just freaked out my cat using `say`. I'm going to enjoy this too much.
Re: macOS command-line tools you might not know about
#253I just freaked out my cat using `say`. I'm going to enjoy this too much.
try it out with different voices, for starters try say "process failure" -v trinoids you can find all the available voices with say -v '?' or from Accessibility>Spoken-Content>System-voice>Manage-voices
Re: macOS command-line tools you might not know about
#254Re: macOS command-line tools you might not know about
#255`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.
pbpaste > tmp; vim tmp; cat tmp | pbcopy; rm tmp;
I also use pbpaste to append various notes to files, but since pbpaste doesnt have a newline at the end I wind up using: echo "$(pbpaste)" >> notes.txtRe: macOS command-line tools you might not know about
#256Earlier quoted context omitted.
If I had a nickel for each `cat foo.json | jq | pbcopy`, I'd be a rich man :)
That's a useless use of cat. You can use `jq . foo.json | pbcopy` or `jq < foo.json | pbcopy`.
Re: macOS command-line tools you might not know about
#257`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.
pb[paste|copy] are a life improver. Here is a one-liner to edit the pasteboard contents in vim. pbpaste > tmp; vim tmp; cat tmp | pbcopy; rm tmp; I also use pbpaste to append various notes to files, but since pbpaste doesnt have a newline at the end I wind up using: echo "$(pbpaste)" >> notes.txt
Re: macOS command-line tools you might not know about
#258Earlier quoted context omitted.
It creeps me out when the clipboard is unexpectedly shared between my phone and computer. And since the feature seems to turn on randomly but not reliably when I want it to, I’d rather it just didn’t exist.
I have a clipboard manager application called "Paste" (creative i know). Its an awesome app for a million reasons. But one thing I like is that it allows me to see and hear when my iphone copy worked. So I have it enabled so there is a sound when something goes into the clipboard. Even on my mac, I have come to rely on that audio feedback. But it has the added benefit that when I am using my phone in front of my comp…
I've noticed that more and more apps on both macOS and iOS sniff the clipboard contents and randomly clobber it. I usually notice it in apps like Sourcetree, where I'll click something or do a certain action and suddenly I can't paste anymore. I even get a feel for it, like my mind detects the pattern that empties the clipboard so I sense when I can no longer paste, but I can't figure out concrete repeatable steps to make it happen. On iOS it's more random, and I feel like it's probably Facebook doing it, or maybe websites in Safari. I just assume that everything is spying on my clipboard contents now, hoping to log secrets/passwords and PII to sell to scammers.
I have to say, this is one of the more disappointing developments from Apple, that they certainly must know by now about these clipboard shenanigans, but have done nothing to stop them. They need to implement permissions that deny all apps the ability to get/set the clipboard by default, and have an option to ask the user whether so-and-so app can access the clipboard (outside of normal copy/paste), every time with the option to allow always. And all clipboard access attempts should probably get logged somewhere.
Re: macOS command-line tools you might not know about
#259The say command has one of my favorite pieces of that famous Apple polish. If you type `say os x`, it'll actually speak "oh es ten".
Re: macOS command-line tools you might not know about
#260Not a bad list of basic macOS specific cli tools. For a more in depth list, I usually reference https://ss64.com/osx/ .
A tad outdated. At a glance I see it’s missing `networkQuality` (introduced in Monterey) and `realpath` (added in Ventura).