#!/bin/sh safevar() { echo "$@" | sed 's_/_\\/_g' } subvars() { echo "$@" \ | sed "s/{{home}}/$(safevar $HOME)/g" \ | sed "s/{{user}}/$USER/g" }