The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
code that reads commands from the standard i/p and executes the commands Phrozen Smoke High Level Programming 4 01-22-2007 02:06 AM
ksh GUI commands daltonkf Shell Programming and Scripting 1 05-09-2005 03:02 PM
sed commands dbrundrett Shell Programming and Scripting 7 09-28-2004 05:11 PM
commands kironpmullamkuz Security 2 06-27-2002 11:45 PM
BDS Commands bbutler3295 UNIX for Dummies Questions & Answers 3 03-04-2002 08:28 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 01-12-2005
mujtba mujtba is offline
Registered User
  
 

Join Date: Jan 2005
Posts: 1
Unhappy need help with some commands please

In my unix machine I have the following setup.

root 7 Dec 13 10:02 Beta10 -> current
root 7 Dec 13 10:05 Beta11 -> current
root 7 Dec 13 10:06 Beta12 -> current
root 7 Dec 13 10:06 Beta13 -> current
root 7 Dec 13 10:07 Beta14 -> current
root 7 Dec 13 10:08 Beta15 -> current
root 7 Dec 13 10:02 current -> pub/TRIAL16

I used the following commands to set this up:

ln -sf current Beta15
ln -sf pub/TRIAL16flashimage.tgz.rsa current

Here is my question. Instead of manually telling every PC that contains BetaXX to download the 'current' file, how can I write this and say if any PC is NOT equal to current, then download current, otherwise do nothing.

Im new at this, please help.. I don't know if unix commands have IF, ELSE and THEN statements...

thanks
  #2 (permalink)  
Old 01-13-2005
hkhan12 hkhan12 is offline
Registered User
  
 

Join Date: Jan 2005
Location: Canada
Posts: 9
Hi mujtba,

Probably I can not provide you complete help on how to tell every PC to download the 'current file' which contains BetaXX, but I can give you guarantee that unix does has IF, ELSE,.... statements. You might want to look Shell Programming books.

All the best, and please do keep post if you found the answer

Regards
  #3 (permalink)  
Old 01-14-2005
larryase larryase is offline
Registered User
  
 

Join Date: Nov 2004
Posts: 69
hkhan12,

I don't understand you posting. You said download? or Link? Your command is for linking files but I think you would like to something like this:

#!/bin/ksh

typeset -i counter

counter=1

while (( $counter < 100 ))
do

ln -sf current Beta$counter
counter="$counter+1"

done


This will loop throught (100X) and only get the BeatXX PC no other. Unless you want to add a if statment in there. I hop ethis help.
Closed Thread

Bookmarks

Tags
unix commands

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 07:35 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