Convert a ruby script to a bash script
I need to turn this ruby script into bash for i3 on Ubuntu: #!/usr/bin/env ruby sink = %x`pacmd list-sinks | grep -e ‘name:’ -e ‘index:’ -e ‘active’` er = /\* index: ([0-9])/ er.match sink if $1 == "1" print ‘usb’ else print ‘mic’ end The script must be used for i3block and displayed on i3bar.… Read More Convert a ruby script to a bash script