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 > 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
Getting user input stevefox Shell Programming and Scripting 3 02-16-2007 02:09 AM
Creating a Unique ID on distributed systems pic High Level Programming 4 05-10-2006 11:25 AM
Limiting length of user in while creating user Satya Mishra AIX 2 04-15-2005 03:40 AM
Script to count unique number of user loged in elchalateco Shell Programming and Scripting 1 09-30-2002 12:32 PM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 11-19-2005
annie annie is offline
Registered User
  
 

Join Date: Oct 2005
Posts: 11
creating unique lists from user input

hi all,

I'm trying to resolve a scenario where we prompt the user to enter 1 or more disk names.

From there we would run a command on each disk which would give its location.

This would allow us to create a list of disks at location A, a list of disks at location B,....etc...

Any help on creating these multiple lists?

script would do something like:


Enter disk(s): disk1 disk2 disk3 disk4

# behind the scenes we would run something like
# get_location disk1 (for each disk)
# which returns something like NY, Florida, etc...
# would set up the unique lists here
# then give back to user

Disks disk1 disk2 are at location Florida
Disk disk3 is at location NY
Disk disk4 is at location Boston

Our scenerio is a little more complicated than this but I wanted to get it down to the most basic example I could to make the question easier to ask.

Any suggestion on how to build these unique lists in my shell script?
(sadly we can't use perl here as its cross platform...etc..)

thanks
Annie
 

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 08:45 PM.


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