Articles Tagged "bash"

View All Tags

acl-tools-osx v0.1.1 and an Introduction

Back in 2013, I hacked together (and silently released to GitHub) a set of command line utilities for working with OS X file ACLs (Access Control Lists) and ACEs (Access Control Entries), collectively named acl-tools-osx. Included are three utilities written in bash:

Keep Reading...

Why a Bash Implementation of realpath?

Shortly after my recent post of a realpath implementation in bash my friend David Kendal suggested a C implementation would be preferable. I have to admit, it’s far simpler code, it wraps around the actual realpath() so no work to make it functionally equivalent, and it’ll be immensely faster (although I haven’t benchmarked it). See his example implementation. I really can’t agree more.

Keep Reading...

A realpath Implementation in Bash

I was recently informed of an issue with the in-development version of trash (one of the utilities in tools-osx) that required using an absolute path internally instead of a relative path. In most languages one can just run a path through realpath() to get the absolute path for a relative path, but bash (which trash was developed in) doesn’t have an equivalent. Many people suggest readlink, but it’s generally only included in Linux distributions, so BSD-based operating systems (incl. Mac OS X) are a bit out of luck.

Keep Reading...

tools-osx 2011-06-02

I’ve updated my collection of Mac OS X command line tools with improvements to the trash tool:

Keep Reading...

tools-osx 2011-02-25

There’s been a small addition to my collection of Mac OS X command line tools:

Keep Reading...

tools-osx 2010-12-08

I’ve got a new release of my collection of Mac OS X command line tools for you, including:

Keep Reading...

Regular Expressions in Bash (and Alternatives)

While cleaning up some old bash code and preparing tools-osx for release, I happened across a very useful bit of information: bash does support regular expressions! Well, at least bash 3.0 and newer do.

Keep Reading...

Announcing tools-osx

Ever since Mac OS X was released, I’ve found myself working via the command line more and more every year. While there are some native commands like open, pbcopy, and pbpaste with NeXTSTEP roots which help one switch back and forth between the CLI & GUI, I’ve always found a few gaping holes.

Keep Reading...

Automating Countdown Tweets with Bash

Modern Warfare 2 will be out in a few days, so I felt @cowardswayout should count down to the release day. I could spend a few minutes at some point during each of the next few days—assuming I can remember to—posting a nearly-the-same message to Twitter or I could automate it. Yeah, better automate.

Keep Reading...

fixDAVsvn

Subversion, mod_dav, and mod_dav_svn are all pre-installed on Leopard Server, authentication via Open Directory is a piece of cake, and you can even mostly config & manage via Server Admin. Nayan Hajratwala has a good tutorial explaining the setup and the few lines you have to manually add to the apache config files, but there’s one problem: whenever you update any site using Server Admin, it replaces all occurrences of ‘DAV svn’ with ‘DAV Off’, completely defeating the purpose.

Keep Reading...

Automatic Delicious Backups Under Leopard

I’ve been using delicious.com, nee del.icio.us, for my bookmarks on and off since early 2006, but only recently have I decided to really keep all my bookmarks there. Yahoo!‘s future has been somewhat questionable as of late and I’m not entirely sure I like the idea of not having my data backed up in a place where I can get at if the service goes down. I don’t really have control over the former, but the latter I do.

Keep Reading...

Testing the OS Version on Darwin/Mac OS X in bash

I’ve been updating an installer bash script that needs to install different files depending on the version of Mac OS X (and Darwin, for that matter) that the machine is running and so set out to find the easiest, most straightforward way to check the OS version.

Keep Reading...