sed print specific line
nested ternary operator