Difference between revisions of "Scripting"

From Linuxintro
imported>ThorstenStaerk
(New page: foo() { } defines a function in bash.)
 
imported>ThorstenStaerk
Line 3: Line 3:
 
  }
 
  }
 
defines a function in [[bash]].
 
defines a function in [[bash]].
 +
 +
= TroubleShooting =
 +
Use xtrace to get every line of a script shown before the line is executed.
 +
 +
If you want every line to be shown with evaluated values, write the following to the beginning of the script:
 +
set -x
 +
or -xv for verbose

Revision as of 06:57, 20 August 2010

foo()
{
}

defines a function in bash.

TroubleShooting

Use xtrace to get every line of a script shown before the line is executed.

If you want every line to be shown with evaluated values, write the following to the beginning of the script:

set -x

or -xv for verbose