nixCraft Linux Forum

nixCraft

Linux / UNIX 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

Linux answers from nixCraft.


Shell scripting You can discuss the shell scripting, request shell scripts and scripting techniques

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 17-01-2007, 12:47 PM
Junior Member
User
 
Join Date: Jan 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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
  #2 (permalink)  
Old 18-01-2007, 02:06 AM
monk's Avatar
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
OS: Debian GNU/Linux
Posts: 506
Thanks: 0
Thanked 8 Times in 6 Posts
Rep Power: 7
monk has a spectacular aura about monk has a spectacular aura about
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 18-01-2007, 07:47 AM
Junior Member
User
 
Join Date: Jan 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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 23-01-2007, 01:04 AM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 244 Times in 183 Posts
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 Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #5 (permalink)  
Old 16-07-2007, 12:19 PM
Junior Member
User
 
Join Date: Jul 2007
OS: RED HAT ENTERPRISE LINUX 4.0
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
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 17-07-2007, 02:43 PM
Junior Member
User
 
Join Date: Jul 2007
OS: FC
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
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 tools)
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 20-07-2007, 06:21 PM
monk's Avatar
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
OS: Debian GNU/Linux
Posts: 506
Thanks: 0
Thanked 8 Times in 6 Posts
Rep Power: 7
monk has a spectacular aura about monk has a spectacular aura about
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


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 Off


Similar Threads

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


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


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

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 37 38