|
Adding c++ man pages
Submitted by Andrew Coons
Adding the following lines to your .cshrc file will add the c++ man pages for you to use.
# csh-style shell
if ( ${?MANPATH} != 0 ) then
setenv MANPATH ${MANPATH}:/pkgs/SUNWopt/SUNWspro/man
else
setenv MANPATH /pkgs/SUNWopt/SUNWspro/man
endif
After doing this and restarting your tcsh shell you will be able to type man -s3c++ cout and get the man page for cout.
The -s3c++ tells man to look specifically at the c++ man pages and will make sure you get the c++ version of the command .
To get a full list of the man pages available for c++ you can type the following:
ls /pkgs/SUNWopt/SUNWspro/man | less
Shell efficiency tips
Submitted by John Chee
Tab-Completion:
type in a partial file name or directory and hit tab to complete the
filename or folder name:
> g++ pro<tab>
--> (produces)
> g++ prog1.cpp
list all commands starting with ch:
> ch<tab><tab>
-->
charmap checkeq checkpc-3.2.6 chroot
chat checknr chgrp chrtbl
check checkpasswd chkey chsh
checkalias checkpasswd- chmod
checkalias-2.4.2 checkpc chown
Consecutively executing programs:
> g++ prog1.cpp ; ./a.out ; gdb a.out
or
> g++ prog1.cpp && ./a.out || gdb a.out
(won't run ./a.out unless prog1.cpp compiles properly and will only
run gdb on the executable if a.out terminated abnormally)
Executing past commands:
Execute the last command beginning with g
> !g
or
execute by number:
> history | grep 2000
> !2000
|