reorder instructions for shell variable definitions