shell scripts

Can you tell me differences between the following sysvinit /sbin/service command:

service httpd restart

service httpd condrestart

service httpd reload

{ 0 comments }

What is /bin/dash? I noticed that the default system shell /bin/sh was changed to /bin/dash. Why was this change made?

{ 3 comments }

I want to increment the date under UNIX or Linux operating system while writing shell scripts. For example Apr/27/2011 should be incremented as Apr/28/2011 and so on. How do I increment a date in UNIX or Linux shell?

{ 3 comments }

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?

{ 2 comments }

How do I send e-mails from a shell script including file attachments?

{ 5 comments }

I want to copy (rsync to remote server) a directory tree whenever file uploaded or deleted in /var/www/html/upload/ directory under Linux operating systems for backup purpose and/or load balancing purpose without getting into complex file sharing setup such as NFS or GFS iscsi storage. How do I monitor /var/www/html/upload/ and its subdirectory for new files and executes rsync command to make copy back to www2.example.com:/var/www/html/upload/?

{ 25 comments }