Makistos
10/28/2013 - 8:01 AM

This small script can be used to manipulate a number of files in a directory to add text after certain lines that match a pattern. This

This small script can be used to manipulate a number of files in a directory to add text after certain lines that match a pattern.

This example will make the cursor visible in Meego's handset applications when run in /usr/share/applications directory.

#meego #regexp #sed #bash

for i in *.desktop ; do
  sed -i '/^Exec=/s|$| -show-cursor|' $i;
done