I'm doing something like this:
$printer = %x(lpstat -p | grep -q "Eileen" && echo "true" || echo "nil").chomp
if $printer == "true"
puts "do something here"
else
puts "do something else"
end
Is there an easier/shorter way to do that? I'm just checking to see if a print queue exists, and needing to do one thing if it does and another if it doesn't. Thanks!