RSS

Tag Archives: shell scripting

A Begginer’s guide to shell scripting

Shell scripts are one of the easiest programming languages to learn. They are a Linux administrators best friend and you can use them to automate tasks like a server backup or even just to email you the IP address of your Raspberry Pi server on boot.

In this post we will see how to write a simple shell script and then proceed to some intermediate shell scripting examples.

Before we start, I recommend you install “VIM”, a file editor, via yum .

Let’s get started with a simple script to tell us the disk usage in the current directory

techarena51.com

Advertisements
 
Leave a comment

Posted by on June 11, 2014 in Centos, Fedora, Linux, Shell Scripting, Ubuntu

 

Tags:

What Does echo 1>&2 mean

1 – stdout
2 – stderr

This means redirect echo’s output to stderr, with a message on how to use the script,
there needs to be exactly three arguments.

All error conditions should go to stderr.

 
Leave a comment

Posted by on December 8, 2012 in Uncategorized

 

Tags: ,

Shell scripts for remote administration

The most useful way to administer multiple servers

A good tutorial on Shell scripting

http://bash.cyberciti.biz/guide/Main_Page

Useful Shell scripts for remote administration can also be found on the link below

http://www.ibm.com/developerworks/aix/library/au-satdistadmin/index.html

To find the size of large files on the remote server

ssh user@server du -h -a -c /path/tofile |grep ‘G\|M’

Shell script to get Information about your system

http://bash.cyberciti.biz/guide/Getting_information_about_your_system

 
Leave a comment

Posted by on June 3, 2010 in Centos, Fedora, Hosting, Linux, Red hat

 

Tags:

 
%d bloggers like this: