Script to open in default web search provider

Inspired by this post for Windows on Raymond Chen’s blog, detailing how to make a best-effort attempt to open a query in the user’s default browser and search provider, I decided to write a Linux equivalent.

Since Raymond used C# for Windows (what could be more Windows?), I decided to use Bourne shell script for the Linux version (what could be more UNIXy?). Of course, me being me, I couldn’t help but add more error handling than Raymond does for his little programs.

Enjoy.

CC BY-SA 4.0 Script to open in default web search provider by Stephan Sokolow is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

This entry was posted in Geek Stuff. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution under the same terms as the associated post.