Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'perl one-liner for this (w/improved HTML formatting)' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
perl one-liner for this (w/improved HTML formatting)
Authored by: Rainy Day on Dec 29, '05 03:04:48PM
The perl one-liner would look something like this:

  sudo perl -pi'.orig' -e 's/SPOTLIGHT=-YES-/SPOTLIGHT=-NO-/' /etc/hostconfig

This line edits the file, and creates a backup copy of the original with a ".orig" extension.

 

[ Reply to This | # ]

HELP! This made me loose all searching capabilities
Authored by: bcometa on Jan 11, '06 11:21:43AM

Can someone plz post the inverse of this perl command... I typed it into terminal and now I can't search in finder (endlessly searches to no avail) OR using spotlight (doesn't react when i type something in the drop down text box), and the spotlight icon is still on the upper right hand corner of my screen.

Thanks in advance!

Brian



[ Reply to This | # ]
Here's one way to undo it
Authored by: Rainy Day on Jan 12, '06 09:44:31PM
To undo it, simply exchange the YES and NO, like this:

   sudo perl -pi'.orig' -e 's/SPOTLIGHT=-NO-/SPOTLIGHT=-YES-/' /etc/hostconfig

Between the first set of slashes is the "search for" parameter, and the "replace with" is between the second set of slashes (they share the common middle slash).

[ Reply to This | # ]