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 and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
making a archive script jimmyc Shell Programming and Scripting 1 09-15-2007 05:02 AM
making script shary Shell Programming and Scripting 2 06-03-2007 05:16 PM
Making a Script to Start as a Service S.Vishwanath UNIX for Dummies Questions & Answers 3 02-08-2007 01:37 AM
Need help making a script npereira Shell Programming and Scripting 2 01-06-2007 01:14 PM
Making a script exectuable BuyoCat Shell Programming and Scripting 5 09-07-2005 03:07 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-28-2006
rcunn87 rcunn87 is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 24
Making flags for my script

I have no idea how to make my own flags.
  #2 (permalink)  
Old 06-28-2006
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,972
I'm tempted to suggest needle and thread, but that wouldn't be helpful.

We need more information. Could you state what you mean? Could you explain what you're trying to do? Could you tell us what shell you're using?
  #3 (permalink)  
Old 06-28-2006
rcunn87 rcunn87 is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 24
okay well im autmating the backup of log files and itll run fine most of the time in the middle of the night but i want to make flags if i need to manualy run the script if i want to run past a certain time and also if i want to only visit an individual server. im using bash.

Last edited by rcunn87; 06-28-2006 at 03:40 PM..
  #4 (permalink)  
Old 06-28-2006
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,972
Commandline paramaters show up as $0, $1, $2, etc. ./something.sh a b c would have "a" as $0, "b" as $1, "c" as $2. $# is the number of parameters.
  #5 (permalink)  
Old 06-28-2006
jim mcnamara jim mcnamara is online now Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,807
I think he wants to write something to a log, then use that information to restart the job at the point it died. Correct?
  #6 (permalink)  
Old 06-29-2006
rcunn87 rcunn87 is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 24
Not exactly i want it to run with differnt vars and conditions depending on what flags i put out there. So i guess if i want to change vars according to a flag just do a case with the flags i want the $1... to match. but what happens if i change the order. because if i run the script "script -y -t" as i understand $1=y and $2=t so the case would only check for changing vars according to the order i put them in. How would i make it not order dependant.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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




All times are GMT -4. The time now is 04:48 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0