[Bug 160899] replace sane-dev by HAL fdi file
https://bugzilla.novell.com/show_bug.cgi?id=160899 ------- Comment #8 from suse-beta@cboltz.de 2006-09-08 10:57 MST ------- (In reply to comment #7)
After talking to our resmgr maintainer even more,
Please talk to some bash script expert also ;-)
----------------------------------------------------------------- for d in /usr/share/sane/descriptions/*.desc \ /usr/share/sane/descriptions-external/*.desc ; \ do grep ':usbid' $d ; \ done | sort -u -----------------------------------------------------------------
With this I bestow you the "useless use of for loop award". Congratulations! Please use (in one line) grep -h ':usbid' /usr/share/sane/descriptions/*.desc /usr/share/sane/descriptions-external/*.desc | sort -u This does exactly the same and saves the for loop and several calls of grep ;-) An even shorter command is grep -h ':usbid' /usr/share/sane/descriptions{,-external}/*.desc | sort -u (not sure if the {foo,bar} expansion is bash-specific) You might also want to use '^:usbid' (anchor at line start) instead of ':usbid' to avoid strange problems in case a scanner has a funny name ;-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
participants (1)
-
bugzilla_noreply@novell.com