I'm making a autoscan-script with scanimage and want to set up an "autofind-device", but I don't know how to replace ` or '
This is the scanimage command for listing supported devices:
and the output is:
device `hpaio:/usb/HP_LaserJet_3052?serial=00CNSKN09261' is a Hewlett-Packard HP_LaserJet_3052 all-in-one
I would like to to something like:
scanimage -L | sed 's/device \`/\n/' | sed s/\'/\n/' | awk 'NR==2'
scanimage -L | awk '/\`/,/\'/'
So that the output is:
But I can't get sed (or awk) to remove/read the ` or the '
How can I do this?