how to chek for the number of options in an app

Lorenzo Taylor lorenzo at taylor.homelinux.net
Thu Mar 24 16:52:36 EST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ah!  I think I got it!  Try this:

lorenzo at taylor:~$ ls --help |grep [-][-] |wc -l
44
lorenzo at taylor:~$

Note, though, that this only seems to work on commands where every short option
(-o) has a corresponding long option (--option).  You will need to look at the -h
or --help option first to see how the options may be specified and then tailor
the grep expression to fit the specific command.

Lorenzo
- -- 
"We decided that we should evaluate the Microsoft offerings first. Once we
realised what a powerful set of tools they were, it became self-evident this was
the right way to go down."

Microsoft: the right way to go down
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCQzakG9IpekrhBfIRAlx+AKCrrLM5sq4iXpfIokAPhQrpqo6WdQCgthIC
3jAmghpxr2nbLn+3GAXQPtU=
=s4bp
-----END PGP SIGNATURE-----




More information about the Speakup mailing list