Shell script helpers