CODE-IT SOFTWARE     

  a no nonsense Wyoming U.S.A. enterprise since 1997

    HOME        SUPPORT      


 What the heck is a "Bash Shell Script" and why might I give a flip...

Normally shells are interactive. It means shell accept command from you (via keyboard) and execute them. But if you use command one by one (sequence of 'n' number of commands) , then you can store this sequence of command to text file and tell the shell to execute this text file instead of entering the commands. This is known as a shell script. Shell script defined as: "Shell Script is a series of commands written in plain text file".

Shell scripting advantages and disadvantages...
Advantages:
To automate the frequently performed operations
To run sequence of commands as a single command
Easy to use
Portable (It can be executed in any Unix-like operating systems without any modifications)
Disadvantages:
Slow execution speed compared to any programming languages
A new process launched for almost every shell command executed

Confused yet? 
Don't worry - really the reason you might be confused is cuz it's so simple - you're most likely trying to make it harder then it is. Lets get right to it and create our first script files so you'll gain some confidence? See what they do, modify them within an ASCII text editor to gain experience, create your own to backup your home folder every day at a certain time or whatever else you might find productive or fun ;-)

Here's a few simple Bash Scripts that you might enjoy (or not)...

Speak the Clipboard

Place this very simple Bash script anywhere on your system (i.e home, desktop, etc...)

Double click to activate  - select to "run". Of course you can also activate via the terminal ;-)

The script will "speak" content that has been copied to the clipboard (i.e email message, web page, document, etc...).

DOWNLOAD IT HERE...

Install and compatibility info:

12751a0ce7487d3f78d0b3dbbe51dc78 = the MD5 hash for 'speak_the_clipboard.zip'

If you want to check to verify that the file you have downloaded has not been tampered with: after downloading the file- type "md5sum thefilename.zip"  ("thefilename.zip" needs to be the complete path and name of the file) in the Linux Terminal. If it returns the same value as I have given you then you're good to go - otherwise please request assistance from mb@code-it.com

Also you'll need to have "espeak" installed (most systems will by default) - if not use this command in the terminal:

You can install espeak using `apt-get  install espeak'


Speak the Web

Place this very simple Bash script anywhere on your system (i.e home, desktop, etc...)

Double click to activate  - select to "run in terminal". Of course you can also activate via the terminal ;-)

The script will "speak" the web page of your choice. This would be a good script to play around with and enhance if you might want to  ;-)

DOWNLOAD IT HERE...

Install and compatibility info:

7b13cd04cfa54360452a11f5f4176de9 = the MD5 hash for 'speak_the_web.zip'

If you want to check to verify that the file you have downloaded has not been tampered with: after downloading the file- type "md5sum thefilename.zip"  ("thefilename.zip" needs to be the complete path and name of the file) in the Linux Terminal. If it returns the same value as I have given you then you're good to go - otherwise please request assistance from mb@code-it.com

Also you'll need to have "espeak" and "fortune" installed (most systems will by default) - if not use these commands in the terminal:

You can install "espeak" using `apt-get  install espeak'

You can install "fortune" using `apt-get  install fortune'


Speak Now

Place this very simple Bash script anywhere on your system (i.e home, desktop, usr/bin, usr/local/bin...)

Double click to activate  - select to "run". Of course you can also activate via the terminal ;-)

The script will "speak" the current date and time then exit.

BUT WAIT ! This script was actually crafted to speak the date and time at system startup. There are several ways to configure a system file to activate a script at system startup but the very easiest way that I have found is to merely type in "startup" as the phrase to search for in the Linux Mint Menu - then select "Startup Applications" - it will pop up a screen to allow you to add the script to it's collection (see image below). After that is done the script will "speak" the date and time every bootup or reboot instance. Ain't it great - how doggone easy that is?

  

This would be a good script to play around with and enhance if you might want to  ;-)

You can EASILY enhance or configure the "voice" by simply opening the script (in an ASCII text editor) and adding "tags" to be applied to "espeak". Just remember to set the script to "Executable" as a property if that got changed somehow. Here are just some of the over 70 tags that you can apply:

-a <integer> Amplitude, 0 to 200, default is 100
-g <integer> Word gap. Pause between words, units of 10mS at the default speed
-p <integer> Pitch adjustment, 0 to 99, default is 50
-s <integer> Speed in words per minute, 80 to 450, default is 175
-v <voice name> Use voice file of this name from espeak-data/voices

Hack these values until you get it just right or not at all ;-)

An example might be - If you might want to modify the speed, volume and pitch you can easily do so by applying  tags (i.e. espeak - s 150 - a 150 -p 30). This would slow down the speed from the default of 175 words per minute to 150, turn up the volume from 100 to 150 and set the pitch to resemble a gruffly old man - lowering it from 50 to 30.

DOWNLOAD IT HERE...

Install and compatibility info:

d9238412c264744d8a38d8bb788e0e8c = the MD5 hash for 'Speak_Now.zip'

If you want to check to verify that the file you have downloaded has not been tampered with: after downloading the file- type "md5sum thefilename.zip"  ("thefilename.zip" needs to be the complete path and name of the file) in the Linux Terminal. If it returns the same value as I have given you then you're good to go - otherwise please request assistance from mb@code-it.com

Also you'll need to have "espeak"  installed (most systems will by default) - if not use this command in the terminal:

You can install "espeak" using `apt-get  install espeak'

Web Cam Spy

A ziiped folder that contains 4 different BASH scripts that secertly take a web cam snapshot every "x" minutes. Includes a script to preview them (via a slide show) and create a video of the images.

Released as "beta" - would greatly appreciate anyone willing to give it a "test drive" and then let me know what you think;-)

MORE DETAILS  HERE...


Hack'n the Linux - mikeB

This site does NOT use Google or any other Site Analyzer to capture or track your data. 

We respect your PRIVACY & FREEDOM.

Need any help or support? Please feel free to contact mb@code-it.com

UNAUTHORIZED REPRODUCTION AND DISTRIBUTION OF THIS (C) INFORMATION WOULD BE DEEPLY APPRECIATED!