apropos . search manuals

commandline session

$ 4.2.20 4 207---> apropos "memory management"
XtAsprintf (3)       - memory management functions
XtCalloc (3)         - memory management functions
XtFree (3)           - memory management functions
XtMalloc (3)         - memory management functions
XtNew (3)            - memory management functions
XtNewString (3)      - memory management functions
XtRealloc (3)        - memory management functions
$ 4.2.20 5 208--->

$ 4.2.20 5 208---> apropos "source install"
libsrcinst (3)       - GNU Source Installer library API
sourceinstall (1)    - GNU Source Installer command line tool
$ 4.2.20 6 209---> apt-cache show sourceinstall
N: Unable to locate package sourceinstall
E: No packages found
$ 4.2.20 7 210--->

troubleshooting Part 1

commandline session

$ 4.2.20 5 176---> cat program.sh
#!/bin/bash
# trouble: script to demonstrate common errors
number=1
if [ $number = 1 ]; then
echo "Number is equal to 1."
else
echo "Number is not equal to 1."
fi
$ 4.2.20 6 177---> sh program.sh
Number is equal to 1.
$ 4.2.20 7 178--->

Missing Quotes

$ 4.2.20 8 179---> cat program.sh
#!/bin/bash
# trouble: script to demonstrate common errors
number=1
if [ $number = 1 ]; then
echo "Number is equal to 1.
else
echo "Number is not equal to 1."
fi
$ 4.2.20 9 180---> sh program.sh
program.sh: 9: program.sh: Syntax error: Unterminated quoted string
$ 4.2.20 10 181--->

Missing or Unexpected Tokens

$ 4.2.20 11 182---> cat program.sh
#!/bin/bash
# trouble: script to demonstrate common errors
number=1
if [ $number = 1 ] then
echo "Number is equal to 1."
else
echo "Number is not equal to 1."
fi
$ 4.2.20 12 183---> sh program.sh
program.sh: 6: program.sh: Syntax error: "else" unexpected (expecting "then")
$ 4.2.20 13 184--->

Unanticipated Expansions

$ 4.2.20 14 185---> cat program.sh
#!/bin/bash
# trouble: script to demonstrate common errors
number=
if [ $number = 1 ]; then
echo "Number is equal to 1."
else
echo "Number is not equal to 1."
fi
$ 4.2.20 15 186---> sh program.sh
program.sh: 4: [: =: unexpected operator
Number is not equal to 1.
$ 4.2.20 16 187--->

Note
Token (parser), usually a word or other atomic parse element.

Debug tools

<div
Bug Tracking System available through a web interface

software bugs .

knowledge drop

Bugs due to conceptual error
syntactically incorrect program, wrong or inappropriate design or concept employed.
Math bugs
Division by zero, arithmetic overflow or underflow, lack of arithmetic precision due to rounding etc.
Logic bugs
infinite loops and infinite recursion.
Syntax bugs.
Resource bugs
Buffer overflow, access violations, usage of an uninitialized variable.
Co-programming bugs
concurrency errors, deadlock, race condition.
Team-working bugs
non-matching of documentation and product, out-of-date comments etc.
source: http://www.articlesbase.com/programming-articles/software-bug-and-their-common-types-895408.html