in /etc/chromium-browser/default, unecessary invocation of grep and sed invoked twice

Bug #1473661 reported by J G Miller
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linux Mint
New
Undecided
Unassigned

Bug Description

DISTRIB_CODENAME=qiana
DISTRIB_DESCRIPTION="Linux Mint 17 Qiana"
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=17

In the file /usr/share/linuxmint/common/artwork/chromium/default which gets copied by Linux Mint Adjustments to
/etc/chromium-browser/default (and why the disparity/lack of consistency in the file paths - one is chromium and the other
is chromium-browser?) there is the line

flashversion=`strings $flashso|grep ^LNX|sed -e "s/^LNX //"|sed -e "s/,/./g"`

When using sed, it is pointless and wasteful to precede it with a lgrep process to extract a unique line since sed has its own line matching functionality.

Thus, this line can be simplified to the more robust form without invoking grep and only invoking sed once and not twice as in the original.

flashversion=$(strings "${flashso}" | sed -ne '/^LNX /s|,|.|g ; s|^LNX ||p')

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.