Skip to content

Jaime Rios

  • About
  • Github
  • LinkedIn
  • X

Shell

Shell script to get path of application in MacOS

August 10, 2011 by jaimerios

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

Categories Tip Tags AppleScript, Bash, sh, Shell Leave a comment

UNIX tip of the day

July 7, 2011 by jaimerios

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

Categories Coding, Tip Tags c++filt, Shell, Terminal.app, TextMate, Unix Leave a comment

How to duplicate one file … a lot

June 10, 2011 by jaimerios

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

Categories Tip Tags batch, bsh, copy, file copy, Shell Leave a comment

Using DTerm and the shell to rename files

December 6, 2010 by jaimerios

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

Categories Tip Tags Bash, DTerm, Rename files, Shell Leave a comment

Recent Posts

  • Package management with CMake’s CPM
  • Automate Evernote using AppleScript
  • Unit Tests and CMake
  • clang static analyzer
  • C++ std::erase and rbegin/rend

Recent Comments

  1. Connecting with C++ – Jaime Rios on Working with REST
  2. Connecting with C++ – Jaime Rios on Making a connection using Swift
  3. Jaime on Xcode 3.1, Perforce and Scripts
  4. jaimerios.com » Blog Archive » Haversine formula now on GitHub on Calculating distance between 2 points on Earth using the Haversine formula
  5. iPhone 3G: How to show locations around a fixed point? | Questions on Calculating distance between 2 points on Earth using the Haversine formula
© 2025 Jaime Rios • Built with GeneratePress