Archive for the ‘bash’ Category
Thursday, October 9th, 2008 |
Tags: geek, os x, terminal, unix
Posted in bash | No Comments »
I have added aliases and other customisations to my bash shell over the last four years to reach a point I’m quite happy with.
Ultimately, I think everyone’s shell will be different as well perform different tasks and have different priorities. (more…)
Thursday, October 9th, 2008 |
Tags: ard, geek, os x, sysadmin
Posted in applescript, awk, bash, os x, sysadmin | No Comments »
If you administrate a number of Mac clients you’ll no doubt be familiar with Apple’s Remote Desktop. As is the case with most software additional functionality becomes available in new release and ARD is no exception. Hence the ARD client version is a relevant piece of information and when I needed to get the information from a user without using Remote Desktop itself I came up with the following code. (more…)
Tuesday, August 26th, 2008 |
Tags: geek, postfix, sysadmin
Posted in awk, bash, sysadmin | 2 Comments »
One of the mail servers I manage was blocked up to the hilt with sixteen thousand emails sent to a specific recipient. This meant no one could send or receive email in the office until Postfix had delivered the messages. Only problem was these messages weren’t going anywhere. To make matters worse, the queue contained important emails that had to be delivered! (more…)
Thursday, August 14th, 2008 |
Tags: bash, geek, shell, tab, terminal
Posted in applescript, bash, geek | No Comments »
Just a quick snippet I’m using to open a new tab in Terminal. It accepts a single, optional argument which will override cd’ing to the working directory.
#!/usr/bin/env bash
if [[ $# -eq 0 ]]; then
dir=`pwd`
else
dir=$1
fi
/usr/bin/osascript \
-e "tell app \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down" \
-e "tell app \"Terminal\" to do script \"cd $dir\" in front window" \
-e "tell app \"System Events\" to tell process \"Terminal\" to keystroke \"l\" using control down"
I’ve put the shell script in “/usr/local/bin” as this is in my $PATH. I’ve named the script “tab” so whenever in Terminal I can enter “tab” to open a new tab with the current working directory ready and waiting. Very useful when working with Rails and multiple shells.
Wednesday, July 30th, 2008 |
Tags: bundle, css, geek, textmate, unix
Posted in awk, bash, coding, geek | 2 Comments »
If you use TextMate when you’re coding for the web you’ll probably have at least tried out Jim Jeffer’s CSS Bundle, which was inspired by an article by Jina Bolton. If not check it out!
When I first downloaded it I was impressed but not exactly blown away as the snippets don’t really leverage the true power of TextMate’s bundle system. I had to get to work to make things a lot smoother. (more…)
Monday, July 21st, 2008 |
Tags: bash, geek, itunes, lsof, shell
Posted in bash, geek | No Comments »
A while back I wanted to know what people were listening to if they were sharing my iTunes library. I used lsof in a little bash script to find out. (more…)