Unix: Writing more maintainable shell scripts