Archive

Archive for July, 2010

Shell Script to lookup QNX docs

July 27th, 2010 2 comments

Here is a shell script that should run on any system with Python but I only tried it on Mac. It will lookup the QNX documentation for any library call you pass in on the command line.

This is how you use it:

  qnxhelp printf

And it will then open up a web browser with the docs for 6.4.1′s library page for printf.

Here is the script code for qnxhelp:

#!/usr/bin/env python
import os, string, sys, webbrowser
if (len(sys.argv) != 2):
    print "Usage:  %s <command to lookup>" %(sys.argv[0])

else:
    word = sys.argv[1]
    char = word[:1]
    location = "http://www.qnx.com/developers/docs/6.4.1/neutrino/lib_ref/%s/%s.html" % (string.lower(char), string.lower(word))    webbrowser.open(location)
Categories: QNX Tags: