TextBuddy v1.2 will let you pipe your text into any shell command that accepts stdin and insert the results from stdout back into your document.
In this example, I want a list of all the Microsoft apps on my Mac sorted in reverse alphabetical order. The steps are:
- Run
ls /Applications
to get a list of all the applications on my Mac. - Then,
grep Microsoft
to filter out the apps I’m not interested in. - And finally,
sort -r
to reverse the remaining list.
Shell commands don’t have to live independently of other TextBuddy commands. Here’s another example where I want to find all the URLs on my blog’s home page that only point to other pages on my website.
- Run
curl https://tyler.io to
fetch the HTML from my blog’s front page. - Use TextBuddy’s built-in command to extract all URLs.
- Filter out any URLs that don’t link to my domain name with
grep tyler.io
.