Difference between revisions of "Scripting"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
Line 13: Line 13:
 
  set -x
 
  set -x
 
or -xv for verbose
 
or -xv for verbose
 +
 +
= See also =
 +
* [[sHell programming]]

Revision as of 20:39, 1 January 2012

foo()
{
}

defines a function in bash.

Usecases

Delete linebreaks

cat file | tr '\

' '; ' > newfile

TroubleShooting

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

See also