shell scripts

Shell script wrappers can make the *nix command more transparent to the user. The most common shell scripts are simple wrappers around third party or system binaries. A wrapper is nothing but a shell script that includes a system command or utility.

Linux and Unix like operating system can run both 32bit and 64bit specific versions of applications. You can write a wrapper script that can select and execute correct version on a 32bit or 64bit hardware platform. In cluster environment and High-Performance computing environment you may find 100s of wrapper scripts written in Perl, Shell, and Python to get cluster usage, setting up shared storage, submitting and managing jobs, backups, troubleshooting, invokes commands with specified arguments, sending stdout to stdout and stderr to stderr and much more.

In this post, I will explains how to create a shell wrapper to enhance the basic troubleshooting tool such as ping and host.

{ 11 comments }

There are some misconceptions that shell scripts are only for a CLI environment. You can easily use various tools to write GUI and/or network (socket) scripts under KDE or Gnome desktops. Shell scripts can make use of some of the GUI widget (menus, warning boxs, progress bars etc). You can always control the final output, cursor position on screen, various output effects, and so on. With the following tools you can build powerful, interactive, user friendly UNIX / Linux bash shell scripts.

{ 100 comments }

Our FAQ section is updated in last few days with new howtos:

  • Linux Network IP Accounting – I need to know how much data are transmitted on my ppp0 network or eth0 Internet links? How do I set IP accounting by address such as 123.1.2.3 and 123.1.2.4? How do I set IP accounting per Apache virtual domain? How do I set accounting by service port (http, smtp) and protocol (tcp, udp, icmp)? How do I record how much traffic each of the clients computer is using?
  • Linux / UNIX: DNS Lookup Command – How do I perform dns lookup under Linux or UNIX or OS X operating systems without using 3rd party web sites for troubleshooting DNS usage?
  • Linux: Find Out Which Process Is Listening Upon a Port – How do I find out running processes were associated with each open port? How do I find out what process has open tcp port 111 or udp port 7000 under Linux?
  • Google Apps Domain Create SPF Records For BIND or Djbdns – I work for a small business and outsourced our email hosting to Google. However, I noticed that spammers are using our From: First Last to send their spam messages. All bounced messages come to our catch only account. How do I stop this? How do I validate our domain using SPF? How do I configure a SPF for Google Apps domain using BIND 9 or djbdns?
    Mac Os X: Mount NFS Share / Set an NFS Client – How do I access my enterprise NAS server by mounting NFS filesystem onto my Mac OS X based system using GUI and command line based tools?
  • Explains: echo Command (echo $”string”) Double-quoted String Preceded By a Dollar Sign – I noticed that many shell scripts in /etc/init.d/ directory use the following syntax – echo $”Usage $prog start|stop|reload|restart”. Why a double-quoted string preceded by a dollar sign ($”string”) using the echo command under Linux / UNIX bash scripts?
  • Get intimated about our new howtos / faqs as soon as it is released via RSS feed.

{ 0 comments }

This may come handy while writing cross-platform scripts.

If you don’t want to commit to the idiosyncrasies of a specific shell running on a particular platform, try the Squirrel Shell. The Squirrel Shell provides an advanced, object-oriented scripting language that works equally well on UNIX, Linux, Mac OS X, and Windows systems. Write a script once, and run it anywhere.

Squirrel is a high level imperative/OO programming language, designed to be a light-weight scripting language that fits in the size, memory bandwidth, and real-time requirements of applications like video games.

=> Speaking UNIX: The Squirrel portable shell and scripting language

{ 0 comments }

Use ‘cvlc’ to use vlc without interface. This is useful for command line playing or ripping using shell scripts.

{ 1 comment }

A quick way to fix shell post / pre execution scripts package problem under Debian / Ubuntu Linux.

{ 21 comments }