Conditionally setting DISPLAY variables in bash

A tiny snippet of useful bash shell code today, to help with setting your DISPLAY variable if integrating Cygwin/X into your Windows environment, add it to a .bashrc for effect. Launching X apps from the ‘Cygwin Terminal’ is smoothed as a result. #RT Check for XWin and set DISPLAY if present. ps -a | grep … Continue reading Conditionally setting DISPLAY variables in bash

Advertisements

Using the Unix Epoch timestamp for file naming

Another aide-mémoire today, illustrated via a small script. I was musing on file version numbering (yes I know about SVN et al, but sometimes they are overkill) and considered using the time represented as the number of seconds elapsed since the Unix Epoch, seems like a simple approach wrapped into the file and filename, what … Continue reading Using the Unix Epoch timestamp for file naming