Korn shell (ksh), a command-line interface for Unix. The main advantage of ksh over the traditional Unix shell is in its use as a programming language. Since its conception, several features were gradually added, while maintaining strong backwards compatibility with the Bourne shell.
IBM has published Korn shell scripting – A beginner’s guide:
Sysadmin because even developers need heroes!!!
Korn shell scripting can save you a lot of time and make your job so much easier. It can seem intimidating at first, but remember to always start out simple and build upon each and every script. Always follow the same steps: build your script header, define your variables, and error check your work. You just might find yourself trying to write a script for everything you do.
Korn shell scripting is something all UNIX users should learn how to use. Shell scripting provides you with the ability to automate many tasks and can save you a great deal of time. It may seem daunting at first, but with the right instruction you can become highly skilled in it. This article will teach you to write your own Korn shells scripts.
Razvan talk about hooking Amarok to MySQL database server and create an MP3 file server. I this is an excellent hack:
When it comes to playing music in Linux, Amarok is one of the best audio players out there. It offers almost everything you need, from a clean, intuitive interface to a range of useful scripts. You can even put it on a server and give it a Web interface.
ObsidianMusic was previously known as amaroK Web Frontend. It is a collection of scripts that, combined with a MySQL database and the Amarok player, forms an excellent way of sharing MP3 files over the Internet or a small office network. All the music files in your collection can be played, downloaded, or streamed by a regular Web browser. Furthermore, ObsidianMusic offers search capabilities and music sorting, and can be customized using themes.
=> Create an MP3 file server using Amarok and ObsidianMusic
This article examined a simple, but powerful, method to run commands on a remote machine using combination of ssh and a shell script:
Use Secure Shell (SSH) to run commands on remote UNIX systems and, with some simple scripts, put together a system that enables you to manage many systems simultaneously from one machine without having to log in directly to the machines themselves. Also examine the basics of a distributed management system and some scripts and solutions using the technique.
I have already covered how to execute commands on multiple Linux or UNIX servers via a shell script. The disadvantage of shell script is commands do not run in parallel on all servers. However, several tools exist to automate this procedure in parallel. With the help of tool called tentakel (highly recommended) , you run distributed command execution. Also, you can execute commands on multiple Linux or UNIX servers using special tools such as multixterm from expect project.
=> Distributed administration using SSH
When invoked without arguments, the date command displays the current date and time. Depending on the options specified, date will set the date and time or print it in a user defined way. I’ve seen many sysadmin writing perl scripts for calculating relative date such as yesterdays or tomorrows day. You can use GNU date command, which is designed to handle relative date calculation such as:
- 1 Year
- 2 Days
- 2 Days ago
- 5 Years
[click to continue…]
You may notice that most shell and Perl script starts with the following line:
[click to continue…]