Refactored bash directive