Live data from Hacker News

macOS command-line tools you might not know about

saurabhs.org

451–454 of 454 posts

Re: macOS command-line tools you might not know about

#451

Needs to mention afplay for playing audio! You can easily use this to make a command-line MP3 player. Others have mentioned the “say” utility for speech synthesis. There is a lot you can do with it, it supports the TUNE format, which allows you to "shape the overall melody and timing of an utterance... for example ... to make an utterance sound as if it is spoken with emotion". See: Apple's Speech Synthesis Programmi…

Thank you for the article :) One small correction, the command to list the voices is `say -v '?'`

Re: macOS command-line tools you might not know about

#452
post #413

Earlier quoted context omitted.

https://learn.microsoft.com/en-us/windows/powertoys/awake to keep Windows itself awake?

Hoping for something in WSL land.

`vmIdleTimeout` in .wslconfig might be an option? Win 11 only though

Re: macOS command-line tools you might not know about

#454
Great list, working with Mac a long time and found some good things here. This might be useful too:

# cd to frontmost open finder folder (in Terminal cd to the current top finder window) cdf() { cd "`osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)'`"; pwd; }

# Copy the frontmost open finder folder Path from Terminal to the Clipboard in MacOS: cpf() { echo "`osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)'`"|pbcopy; }

# open manpage in preview app: pman() { mandoc -T pdf "$(/usr/bin/man -w $@)" | open -fa Preview; }

# Function to delete a given line in ssh known_hosts file: xho() { line=$1;tFile="$HOME/.ssh/known_hosts";sed -e "${line}d" -i ".tmp" "$tFile";}

Post reply on HN