nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

shell scripts required for students

This is a discussion on shell scripts required for students within the Shell scripting forums, part of the Development/Scripting category; hi guys... i need some shell scripts examples for my students lab cycle...need to prepare atleast 90...sumthin realted to system ...


Go Back   nixCraft Linux Forum > Development/Scripting > Shell scripting

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 01-17-2007, 01:47 PM
Junior Member
 
Join Date: Jan 2007
Posts: 2
Rep Power: 0
roni
Default shell scripts required for students

hi guys...
i need some shell scripts examples for my students lab cycle...need to prepare atleast 90...sumthin realted to system administration would be ideal...nyone with such materials -pls send to roni.samuel@gmail.com..

Regards,
roni
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 01-18-2007, 03:06 AM
monk's Avatar
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
My distro: Debian GNU/Linux
Posts: 482
Rep Power: 5
monk will become famous soon enough monk will become famous soon enough
Default

You need to post your shell script problem.. or may be i am not understanding what do you want...??
Reply With Quote
  #3 (permalink)  
Old 01-18-2007, 08:47 AM
Junior Member
 
Join Date: Jan 2007
Posts: 2
Rep Power: 0
roni
Default

hey,
I need few shell scripts for beginners...These are for my students to try out..I wsant to give them these in addition to the regular lab cycle...I found a lot of scripts online but most of it is not what I want...

Regards,
Ron
Reply With Quote
  #4 (permalink)  
Old 01-23-2007, 02:04 AM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,036
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

You can give basic scripts like write script to add users and to make a backup and so on
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
  #5 (permalink)  
Old 07-16-2007, 01:19 PM
Junior Member
User
 
Join Date: Jul 2007
My distro: RED HAT ENTERPRISE LINUX 4.0
Posts: 1
Rep Power: 0
bhavya_0007 is on a distinguished road
Default

Quote:
Originally Posted by monk View Post
You need to post your shell script problem.. or may be i am not understanding what do you want...??
actually i want a script which can monitor cpu usage,ram usage,swap usage,disk capacity etc....pls help me out.
Reply With Quote
  #6 (permalink)  
Old 07-17-2007, 03:43 PM
Junior Member
User
 
Join Date: Jul 2007
My distro: FC
Posts: 3
Rep Power: 0
sajith is on a distinguished road
Default

Quote:
Originally Posted by bhavya_0007 View Post
actually i want a script which can monitor cpu usage,ram usage,swap usage,disk capacity etc....pls help me out.

hope you are not trying to monitor regularly(otherwise use monitoring tool
some time i used script for checking remote host through ssh.all basic commands
################################################## ###########################
### this is the script for getting remote host info using ssh keygen#########
################################################## ###########################
#name of the script sajithsvr.sh
#give permission as chmod 755 sajithsvr.sh
#copy the keygen to specific folder
#using ssh -i need not to give password for login as root
#******script******
#bin/bash
#logging to system through ssh
#name of the server
echo "host_name" alias squid1
ssh -i /home/sajith/tes/keypair root@remotehost "hostname"
#swap memory
echo "swap_usage"
ssh -i /home/sajith/tes/keypair root@remotehost "free -m"
#disk space
echo "disk_usage"
ssh -i /home/sajith/tes/keypair root@remotehost "df -h"
#stastistics and memory
#ssh -i /home/sajith/tes/keypair root@remotehost "vmstat"
#system uptime and processor usage
echo "processor_info"
#ssh -i /home/sajith/tes/keypair root@remotehost "uptime"
ssh -i /home/sajith/tes/keypair root@remotehost "mpstat"
#logged users
#ssh -i /home/sajith/tes/keypair root@remotehost "who"
exit

you can use with your commands
say eg.
vi test.sh and give execution permission chmod 755 test.sh
#bin/bash
echo "swap_usage"
free -m
echo "disk_usage"
df -k
echo "users"
who
Reply With Quote
  #7 (permalink)  
Old 07-20-2007, 07:21 PM
monk's Avatar
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
My distro: Debian GNU/Linux
Posts: 482
Rep Power: 5
monk will become famous soon enough monk will become famous soon enough
Default

There are plenty of scripts here Bash shell scripts directory for Linux, FreeBSD, Solaris, UNIX
__________________
May the force with you!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
SSH - Passing Unix login passwords through shell scripts arulkumarr Shell scripting 4 08-27-2008 10:22 PM
running command a root in shell scripts chiku Shell scripting 1 07-17-2006 07:39 PM
required help for running a shell script from browser vaishalichitale Shell scripting 1 06-27-2006 05:53 PM
Shell,perl plsql programmer required (get paid) amitoverseas40 Solaris/OpenSolaris 0 08-13-2005 10:15 PM
Shell,perl plsql programmer required (get paid) amitoverseas40 Shell scripting 0 08-13-2005 10:12 PM


All times are GMT +5.5. The time now is 06:58 PM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36