Librenix
Headlines | Linux | Apps | Coding | BSD | Admin | News
Information for Linux System Administration 

Detailed Error Handling In Bash

Up
vote
Down

Shell scripts are often running as background processes, doing useful things without running in a visible shell. To write such scripts can be quite painful, as all errors occur out of sight as well. While log files can hold a lot of information, finding the relevant information is a bit trickier. My solution is to log only the errors with all the details to a small database. This database contains tables for the message, the corresponding stack trace and the important environment variables. I have chosen for an SQLite database in this howto, but the same principle works with other databases as well.
 read more | mail this link | score:9610 | -falko, February 21, 2013
More Programming articles...

Large Framed Abstract Art

coding headlines

No Starch Press has published my Perl One-Liners book!

Add Video Streaming to C/C++ apps with Nex Gen Media Server API

Sustitution with sed

Basic awk lesson

Command substitution in Bash scripting

Build Apps with Android SDK, Eclipse, PhoneGap (Ubuntu 10.10)

 

Firefox sidebar

Site map

Site info

News feed

Features

Login
(to post)

Search

 
Articles are owned by their authors.   © 2000-2012 Ray Yeargin