[ ispman-Patches-1597818 ] Proof of concept for a ispman CLI wrapper with help support

"SourceForge.net" <[email protected]> Mon, 22 Jan 2007 14:20:04 -0800
Newsgroups gmane.comp.isp.ispman.devel
Message-ID <[email protected]>
Patches item #1597818, was opened at 2006-11-16 17:13
Message generated for change (Settings changed) made by jdelker
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=308390&aid=1597818&group_id=8390

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Andreas John (derjohn)
>Assigned to: Joerg Delker (jdelker)
>Summary: Proof of concept for a ispman CLI wrapper with help support

Initial Comment:
Hi,
I made the following bash script:

---------
# cat /usr/sbin/ispman
#!/bin/sh

if [ "$1" = "help" ] && [ -n "$2" ]; then
        perldoc /usr/share/ispman/bin/$2
        exit 0
fi

if [ -z "$@" ] || [ "help" = "$1" ]; then
        echo The following commands exists:
        ls -1 /usr/share/ispman/bin/ | egrep -o "[^\.]*$"
        exit 0
fi

/usr/share/ispman/bin/ispman.$@
-------

and put the into $PATH (in my case /usr/sbin/....).

Usage:
# ispman dnsshow ...
will simply execute ispman.dnsshow

# ispman help ispman.dnsshow
will do a perldoc on ispman.dnsshow

# ispman help
shows a list of all available ispman.* commands

Rgds,
Andreas



----------------------------------------------------------------------

>Comment By: Joerg Delker (jdelker)
Date: 2007-01-22 23:20

Message:
Logged In: YES 
user_id=43997
Originator: NO

added (slightly changed) to CVS

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=308390&aid=1597818&group_id=8390

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV