Replace %f, %s and %e in shell commands