![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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 |
|
||||
|
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 |
|
||||
|
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. |
![]() |
| Bookmarks |
| Tags |
| unix commands |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|