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

kernel space and user space

Kernel  space. Linux  (which  is a  kernel)  manages the  machine's
hardware  in a  simple and  efficient manner,  offering the  user a
simple  and uniform  programming interface.  In the  same  way, the
kernel,  and in  particular its  device drivers,  form a  bridge or
interface  between the  end-user/programmer and  the  hardware. Any
subroutines or  functions forming part  of the kernel  (modules and
device  drivers,  for  example)   are  considered  to  be  part  of
kernelspace.

User space.  End-user programs,  like the UNIX  shell or  other GUI
based applications  (kpresenter for example), are part  of the user
space.  Obviously, these  applications  need to  interact with  the
system's hardware . However, they  don't so directly, but
through the kernel supported functions.

source :http://www.freesoftwaremagazine.com/articles/drivers_linux

irb interactive ruby and ruby files

commandline session

$ 4.2.20 9 508---> irb
irb(main):001:0> 10+10
=> 20
irb(main):002:0> 34*5
=> 170
irb(main):003:0> 9-8
=> 1
irb(main):004:0> ()
=> nil
irb(main):005:0>
$ 4.2.20 12 511---> ruby sum.rb
3
$ 4.2.20 13 512---> cat sum.rb
a = 1 + 2
puts a
$ 4.2.20 14 513--->


$ 4.2.20 15 514---> irb
irb(main):001:0> Dir.entries('/home/jeffrin/shelter/symmel/')
=> ["Docs", "books", "..", "https:", "debian-howtos", "language", ".git", "linux", "ovlfose", "bugs-general", "Algorithms", "firewall", "config-files", "README", "beautifulwork", ".", "bookmark"]
irb(main):002:0>