Skip to content

{ Category Archives } UNIX

Bash Prompt Redux

OK, so you know a meeting is boring when you would rather redo your bash prompt. (And, yes, as a consequence, I have come to appreciate the point of running a headless meeting.) I wanted my bash prompt to tell me a number of things:

Who am I? Where am I? Which branch of a Git repository am […]

Remembrance of Things Past

In a previous post I discussed bash emacs mode—a convenient way to get around the bash command line quicker. Taking the time to learn these commands definitely yields a welcome boost to productivity. (And if you cannot remember them at first there is a bash cheat sheet.)

I recently learned a few things about bash history […]

Meme

$ history | awk ‘{print $2}’ | sort | uniq -c | sort -rn | head 123 cd 78 ls 27 git 26 svn 14 man 13 mate 12 mkdir 10 sudo 6 ssh 5 most

On the Literary Origin of UNIX

Earlier I noted how current writing technology tends to be the dominant metaphor of the mind. Related to this, is the tendency for writing technology to make a technological platform. Texting was the killer app for the cell phone, and the wordprocessor was the killer app for the PC. But before that, there was UNIX, […]

Running VC

After posting about the version control bundle, I gave it a test spin.

The version control bundle requires GNU awk. If gawk is not installed on your *nix system, this script will do it for you:

#!/bin/sh # # installgawk.sh # # A bash script to install the latest version of GNU awk. Be sure to set the variables to the […]

Bash Emacs Mode

Navigating the command line on Apple’s terminal can be frustrating. The arrow keys only allow you to move one character at a time. So if you have typed a long command, say:

$ perl texWordCount.pl /Users/markkalderon/Documents/TheHub/Research/Metamerism/Drafts/metamerism.tex

and you realize you have forgotten an option, in this case -T:

$ perl -T texWordCount.pl /Users/markkalderon/Documents/TheHub/Research/Metamerism/Drafts/metamerism.tex

it can be tedious to move […]

Full Paths and the Multiline Shell Prompt

The shell prompt in bash can be modified to provide useful information. There are environmental variables that can be set to control the prompt string (see the bash manpage for more information). One of the more useful things, in my opinion, to include in the prompt string is the current path (so you always knows […]

LaTeX, Relative Paths, and Structured Directories

*nix operating systems use the following shorthand: . denotes the present directory and .. denotes the parent directory. Names for directories can be conjoined with a /. So ../.. denotes the second directory up from the present directory. You can go down the hierarchy as well as up. Suppose the present directory is foo and […]

ATPM on Activity Monitor

As I mentioned in my initial post, learning about the UNIX underpinnings of OS X was a revelation. While I would never like to work exclusively in a text based terminal, a lot of UNIX utilities can be exploited by writers as well as coders. While visual editing familiar from word processors tends to obscure […]

In the Beginning Was the Word

One of the unexpected benefits of OS X was my rediscovery of UNIX. Prior to that, I had dim memories of a rarely used UNIX account when I was in college in the mid-eighties. The GUI of the newly installed Macs in some of the computer labs was a welcome relief from what I regarded […]

FireStats icon Powered by FireStats