Add

Simple shell script


This is a simple shell script. This is what it can do:

[1] Display current time and date
[2] Display files from current folder
[3] Display the calendar
[4] Start year text editor
[5] Harddisk information
[6] Verify with ping resourcesit.com

This is the complete script. Feel free to use or modify as you like to:

while:
do
clear
echo "-------------"
echo "Test Menu - www.etuts.resourcesit.com"
echo "-------------"
echo "[1] Display current time and date"
echo "[2] Display files from current folder"
echo "[3] Display the calendar"
echo "[4] Start year text editor"
echo "[5] Harddisk information"
echo "[6] Verify with ping resourcesit.com"
echo "[7] Exit / Stop"
echo "======================="
echo-n "Select option [1-7]:"
read yourch
case $ yourch in
1) echo "Today's date is` date `, Hit enter to resume. . . ", Read;;
2) echo "` pwd `files is:" ls-l echo "Hit enter to resume. . . ", Read;;
3) horse; echo "Hit enter to resume. . . ", Read;;
4) gedit;;
5) df; echo "Hit enter to resume. . . ", Read;;
6) ping resourcesit.com; echo "Hit enter to resume. . . ", Read;;
7) exit 0;;

*) Echo "Hellooo??! I said to pick option year from thoes displayed: 1,2,3,4,5,6 or 7 ";
echo "Hit enter to resume. . . ", Read;;
esac
done

Do not forget to Give the shell permission to execute your script:

chmod 755 the_script.sh

shell-script

1 Star2 Stars3 Stars4 Stars5 Stars (15 votes, average: 5.00 out of 5)
Loading ... Loading ...

The Discussion

see what everyone is Saying

Respond

get in on the action.

Email *

Website

* Required

Rumanian flagItalian flagEnglish flagGerman flagFrench flagSpanish flagRussian flagGreek flagDutch flagBulgarian flagCzech flagCroat flagDanish flagFinnish flagSwedish flagNorwegian flagSerbian flagSlovenian flagUkrainian flagTurkish flagHungarian flag
By N2H

Random Posts Recent Comments

  • Gilgit Baltistan Says:

    good work here ...

  • Cromartie Haynes Says:

    I found the tutorial to Be concise and very helpful. I will be sure to recommend it to others. Than ...

  • admin Says:

    Amigo, Please formulated your question in english if you really need help! Cheers! ...

  • Mauricio Gonçalves Says:

    Boa tarde, I nao consigo Amigo add user novo Podere ajudar me? They pride nao é que a commando ...

  • Aniket Says:

    thanks ..................

  • Eitan Says:

    Thanks for sharing. This article is the most practicable for bind! Cheers, Eitan ...

  • Flossy Says:

    Zubao0 That's really thinking out of the box. Thanks! ...

  • Michael Esch Says:

    I used this tutorial to install Komodo Edit 6 on Ubuntu 10.10, I rate your tutorial 5/5 I hope that ...

  • admin Says:

    @ Dan I run applications created in Visual Basic and fox in the wine, so I would not be ...

  • dan Says:

    I want to tell me if a prg to count as Visual Basic running under Ubuntu with wine inscribed wonder ...

Tag Cloud