some minor shell scripting idioms