The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Pls Help-Script to execute Commands and write to excel file Computer_baby Shell Programming and Scripting 1 01-08-2008 04:34 AM
How to write a script by fork() in unix manas_ranjan UNIX for Dummies Questions & Answers 1 08-13-2007 01:25 AM
how to write examination(multiple choice) script in unix palreddy7 Shell Programming and Scripting 0 10-31-2006 07:13 PM
how can I write script that lets me run shell commands? umen Shell Programming and Scripting 3 03-21-2006 04:33 AM
executing applications/commands on a unix server from a windows PC megastar UNIX for Advanced & Expert Users 1 10-11-2005 07:24 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-13-2007
Registered User
 

Join Date: Sep 2007
Posts: 1
How to write a script by using unix commands to down any server

Hi,

I need to do frequently server down and up. Every time i am using nearly 5 to 6 commands to down and agin i am using the commands to up.
Can anybody help me to write a script to down and up.
which i can use once on unix platform it can down later it can up the server.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 09-13-2007
Registered User
 

Join Date: Aug 2007
Location: Binfield, Berkshire. UK
Posts: 91
Server shutdown and restart

The simplest way is to use and editor (vi ?) to create something like....

#!/bin/ksh
#################
# Server shutdown
#################
#
command1
command2
.
.
commandn



save this and endsure the script file is executable using chmod +x <scriptname>

then execute it by simply running the scriptfile - the same would apply for your shutdown script.

Depending on your situation it *may* not be quite as simple as this but I hope this gets you started
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 04:18 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0