Add to Favorites    Make Home Page 26016 Online  
 Language Categories  
 Our Services  

Home » C Home » Beginners / Lab Assignments Home » To implement the unix commands in shell scripts

A D V E R T I S E M E N T

Search Projects & Source Codes:

Title To implement the unix commands in shell scripts
Author Dhanasekar-lecturer/csice/ooty
Author Email dhanasekar_kongu [at] rediffmail.com
Description This program to implement the all unix basic commands into
shell scripts(mainly easy to understand the unix end users)

Category C » Beginners / Lab Assignments
Hits 320112
Code Select and Copy the Code
true=y while [ "$true" = "y" ] do echo Enter the option echo "MENU 1.list 2.freespace 3.who 4.who am i 5.create a new file 6.oening file 7.delete the file 8.create a directory 9.delete a directory 10.copy the file(same directory) 11.move the file( -do-) 12.clear the screen 13.curect working directory 14.display your shell type" echo Enter a number while read num do case "$num" in 1) ls -al | more echo pree ctrl-d;; 2) df . echo pree ctrl-d;; 3) who echo pree ctrl-d;; 4) who am i echo pree ctrl-d;; 5) echo enter the file name read fname if [ -f $fname ] then echo already exit echo pree ctrl-d else echo type the file contents fi cat > $fname ;; 6) echo enter the file name read fname if [ ! -f $fname ] then echo no file such a directory echo pree ctrl-d else echo pls wait... file opening echo pree ctrl-d fi cat $fname ;; 7) echo enter the deleting file name read dname if [ ! -f dname ] then echo file deleted... echo pree ctrl-d else echo no file such a directory echo pree ctrl-d fi rm $dname ;; 8) echo Enter the directory name read dname if [ -p $dname ] then echo directory already exits echo pree ctrl-d else echo directory creating echo pree ctrl-d fi mkdir $dname ;; 9) echo enter the directory name read dname if [ ! -p $dname ] then echo pls wait.. deleting echo pree ctrl-d else echo no such directory echo pree ctrl-d fi rmdir $dname ;; 10) echo enter the sourec and destination file read sfile dfile if [ -f $dfile ] then echo destination file is already exists echo pree ctrl-d elif [ ! -f $sfile ] then echo no $sfile source file echo pree ctrl-d else echo no problem... copied echo pree ctrl-d fi cp $sfile $dfile ;; 11) echo enter the sourec and destination file read sfile dfile if [ -f $dfile ] then echo destination file is already exists echo pree ctrl-d elif [ ! -f $sfile ] then echo no $sfile source file echo pree ctrl-d else echo no problem... moving echo pree ctrl-d fi mv $sfile $dfile ;; 12) tput clear echo pree ctrl-d;; 13) pwd echo pree ctrl-d;; 14) echo $SHELL echo pree ctrl-d;; *) echo "$cmd: No such command" ;; esac done echo do you continue again to press [y/n]: read yn case $yn in y* | Y*) ture=y ;; n* | N*) true=n ;; *) ture=n ;; esac done echo "All done"

Related Source Codes

Script Name Author
The Game Opposite as seen on Nokia 2300 Mobile Manikanta
RECURSIVE BALANCED QUICK SORT ashish
Radix Sort ashish
Change your mouse pointer Ashim
The blinking star Shashank
Data Validation Crylittlebaby
To search a file by giving file type like mp3 or mpeg or doc Prashanth SR
Menus Demonstration B.Chidhambaram
Employee Database Project Using C. Reenku Raman Nayak
Creating a Lexical Analyzer in c fahad bader al-buhairi դ ? ??
Calendar Program Omkar & Devendra
Stop double Process for start in C Cedrik Jurak
Stop double Process for start in C Cedrik Jurak
Time Scheduler Atiq Anwar
A timepass game between atmost two players Rahul Roy

A D V E R T I S E M E N T




Google Groups Subscribe to SourceCodesWorld - Techies Talk
Email:

Free eBook - Interview Questions: Get over 1,000 Interview Questions in an eBook for free when you join JobsAssist. Just click on the button below to join JobsAssist and you will immediately receive the Free eBook with thousands of Interview Questions in an ebook when you join.

New! Click here to Add your Code!


ASP Home | C Home | C++ Home | COBOL Home | Java Home | Pascal Home
Source Codes Home Page

 Advertisements  

Google Search

Google

Source Codes World.com is a part of Vyom Network.

Vyom Network : Web Hosting | Dedicated Server | Free SMS, GRE, GMAT, MBA | Online Exams | Freshers Jobs | Software Downloads | Interview Questions | Jobs, Discussions | Placement Papers | Free eBooks | Free eBooks | Free Business Info | Interview Questions | Free Tutorials | Arabic, French, German | IAS Preparation | Jokes, Songs, Fun | Free Classifieds | Free Recipes | Free Downloads | Bangalore Info | Tech Solutions | Project Outsourcing, Web Hosting | GATE Preparation | MBA Preparation | SAP Info | Software Testing | Google Logo Maker | Freshers Jobs

Sitemap | Privacy Policy | Terms and Conditions | Important Websites
Copyright ©2003-2022 SourceCodesWorld.com, All Rights Reserved.
Page URL: http://www.sourcecodesworld.com/source/show.asp?ScriptID=945


Download Yahoo Messenger | Placement Papers | Free SMS | C Interview Questions | C++ Interview Questions | Quick2Host Review