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
Help needed with Sort and uniq data asirohi Shell Programming and Scripting 4 08-17-2009 09:25 PM
sort command help needed. salman4u Shell Programming and Scripting 6 03-18-2009 03:22 AM
Help needed to sort file inditopgun Shell Programming and Scripting 2 09-27-2007 07:40 PM
help needed with sort. pipe and popen() the_learner UNIX for Dummies Questions & Answers 7 05-21-2007 08:24 PM
Sort - Help Needed Andysundar UNIX for Dummies Questions & Answers 4 01-23-2006 02:55 AM

 
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 08-24-2009
asirohi asirohi is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 56
Help needed to sort data

Hello All,

Today i have been asking lots of question, hope to become good in scripting soon with all the wonderful advices i get. The question is i want to sort data a get uniq string from it. The code i am using to generate the output is:-

Code:
check_sun() {
for i in $SUN_PLATFORM
do
$ECHO "The path is: "$i
$LS $i | $GREP .su  | $AWK -F"_" '{print $1, path}' path="${i}"
done
}
The output i am getting right now is:

The path is: /vol/local_images/spins/7.1/CQ/sun5/ShareableEntities
base.sun5 /vol/local_images/spins/7.1/CQ/sun5/ShareableEntities
basement.sun5 /vol/local_images/spins/7.1/CQ/sun5/ShareableEntities

The path is: /vol/local_images/spins/7.1/CC/sun5/ShareableEntities
base.sun5 /vol/local_images/spins/7.1/CC/sun5/ShareableEntities
basement.sun5 /vol/local_images/spins/7.1/CC/sun5/ShareableEntities


The output i want is the unique out of the above output, for example:-

base.sun5 /vol/local_images/spins/7.1/CQ/sun5/ShareableEntities /vol/local_images/spins/7.1/CC/sun5/ShareableEntities
basement.sun5 /vol/local_images/spins/7.1/CQ/sun5/ShareableEntities /vol/local_images/spins/7.1/CC/sun5/ShareableEntities

Last edited by asirohi; 08-24-2009 at 02:57 PM..
 

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:59 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