Report a Problem:
Phone: 503-725-5420
Location: FAB 82-01
Home Students Fac/Staff CS Tutors Guidelines Windows Linux Mac Mail Network Software Web TheCAT Sitemap Contact
arrowHome arrow CS Tutors arrow Tips & Tricks arrow General Tips Archive Wednesday, 16 August 2017  
Tips & Tricks
General Tips Archive Print
Tuesday, 18 April 2006
Archived Tip Title
Submitted by
Adding C++ man pages
Andrew Coons
Shell Efficiency Tips
John Chee


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


   setenv MANPATH /pkgs/SUNWopt/SUNWspro/man


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


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


> 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

execute by number:

> history | grep 2000


Last Updated ( Tuesday, 09 May 2006 )

©1999 - 2017 TheCAT