nixcraft's prog links

Book Review Shell Script Pearls

| | |

Shell Script Pearls is designed to provide information about shell scripting. The book is collection with all tips and code sample you need to learn about shell scripting. Author has clearly demonstrated unique tools and script samples that go beyond the level of basic scripting. The book is useful for geeks, hackers, sys admin and advanced users. The book doesn’t explain basic programming structure and syntax. If you are the beginner get some basic book or start with our own tutorial.

You will find lots of useful collection of a shell scripts and practical examples that can be used in da

Linux or UNIX - Connect mysql in C

| | | |

MySQL database does support C program API just like PHP or Perl API.

The C API code is distributed with MySQL. It is included in the mysqlclient library and allows C programs to access a database.

Many of the clients in the MySQL source distribution are written in C. If you are looking for examples that demonstrate how to use the C API, take a look at these clients. You can find these in the clients directory in the MySQL source distribution.

This tutorial provides a sample MySQL C program and step by step compilation instructions to kick start MySQL programming via C API.

PHP encryption symmetric program example using crypt to store password in a text file

| | |

Symmetric encryption is a type of encryption where the same key is used to encrypt and decrypt the message. Symmetric encryption differs from asymmetric (also known as public-key) encryption, which uses one key to encrypt a message and another to decrypt the message.

PHP crypt() will return an encrypted string using the standard Unix DES-based encryption algorithm or alternative algorithms that may be available on the system. Arguments are a string to be encrypted and an optional salt string to base the encryption on. See the Unix man page for your crypt function for more information.

Perl script to monitor free disk space and send email alert

| | | | |

This article explains how to write a perl script that can monitor your disk space under UNIX or Linux and send me an email alert to admin.

There is a nice perl system routine called Perl df or Filesys::DiskSpace. This routine displays information on a file system such as its type, the amount of disk space occupied, the total disk space and the number of inodes etc.

How to debug a Shell Script smartly

| | | |

This article shows you how to write your shell scripts smartly to make them easier to test and debug. You can use traditional set command. There is drawback of using set command. Before moving a script to production environment you need to remove all debug lines. This tip shows you how to solve this old problem without introducing any new errors.

Syndicate content