Shell script to get path of application in MacOS
Here is a shell script that finds an application on my hard drive using a nifty call to Finder using AppleScript: #!/bin/sh result=`exec osascript
Here is a shell script that finds an application on my hard drive using a nifty call to Finder using AppleScript: #!/bin/sh result=`exec osascript
Thanks to my coworker for showing me this: pbpaste | c++filt | mate I use this to take a really long text output from GDB and de-mangle the code into something I can read. I copy the output in the GDB console to the clipboard and the command takes those contents and pastes the results … Read more
I had to duplicate a file… over a thousand times, for a test. For the MacOS, I created a shell script to do this: #!/usr/bin/env bash # I’m passing in the filename as a parameter to the shell script, # which is accesible through $1 for (( i = 0; i < 2000; i++ )); ... Read more
I download files from my bank that have some really long name to them and at the end of the name, is the date. The date is not formatted, of course, and I wanted to rename the files easily, without manually parsing out the string. Now on my computer, I have DTerm and TextMate at … Read more