I stumbled into this fun little tool the other day when I was introduced to it by a friend. Bropages is a bit like man pages, but without all the hemming and hawing and information that you might not need when you are just trying to remember the proper syntax of a command. Bropages just shows you an annotated example of how to run a command.
Before you can get started with Bropages, you need to install it. Note that I am running these commands on my Fedora21 Workstation. Your mileage may vary depending on your distro.
First you will need to install rubygems if its not already installed.
#yum -y install rubygems
Then install bropages — its a ruby gem.
#gem install bropages
Now lets take bropages out for a spin by running bro against the which command
# bro which
2 entries for which — submit your own example with “bro add which”# locates executable
which brobro thanks to upvote (2)
bro …no to downvote (0)………………………………………………………………………………………………………………………………
# Shows all install locations of an executable (in this case ruby)
which -a rubybro thanks 2 to upvote (2)
bro …no 2 to downvote (0)
Neat. As you can see above we have two examples of how to run the which command. Now lets try it against the chage command.
[root@fedora21 ~] $ bro chage
The chage command isn’t in our database.* Typing bro add will let you add chage to our database!
* There’s nothing to lose by typing bro add, it will just launch an editor with instructions.
* Need help? Visit http://bropages.org/help
So bro don’t know chage, as its not in the bro database… let’s add it.
#bro add chage
We are prompted to add our short entry with a brief description
#~ Bro entry for command ‘chage’
#~ Provide a useful example for how to use ‘chage’
#~ Comments starting with #~ are removed
#~
#~ Example for command ‘man’:
#~ # Opens up the manual page for the command ‘ls’
#~ man ls
# Configure a user’s password not to expire
chage -m 0 -M 99999 -I -1 -E -1 username
There, now we have created and submitted our entry.