How to concatenate list of ID's? | Unix Linux Forums | Shell Programming and Scripting

  Go Back    

Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

How to concatenate list of ID's?

Shell Programming and Scripting

Closed Thread    
Thread Tools Search this Thread Display Modes
Old 01-30-2013
buzzme buzzme is offline
Registered User
Join Date: Jan 2013
Last Activity: 5 November 2014, 7:45 PM EST
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
How to concatenate list of ID's?

I have attached list of id's and i need like below using shell script.



output needed:


Attached Files
File Type: txt list if id's.txt (14.5 KB, 12 views)

Last edited by Scrutinizer; 01-30-2013 at 05:56 PM.. Reason: code tags
Sponsored Links
Old 01-30-2013
Scrutinizer's Avatar
Scrutinizer Scrutinizer is offline Forum Staff  
Join Date: Nov 2008
Last Activity: 27 January 2015, 4:59 PM EST
Location: Amsterdam
Posts: 9,807
Thanks: 311
Thanked 2,531 Times in 2,265 Posts
The format of your list of id's differs from your input specification..
Sponsored Links
Old 01-30-2013
Chubler_XL's Avatar
Chubler_XL Chubler_XL is offline Forum Advisor  
Registered User
Join Date: Oct 2010
Last Activity: 27 January 2015, 3:42 PM EST
Posts: 3,085
Thanks: 117
Thanked 998 Times in 935 Posts
Try this:

awk '/^uid=/ { printf "(%s)", $0} END { print "" }' "list if id's.txt"

Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
concatenate variables HackerSeabass Shell Programming and Scripting 4 02-18-2012 06:09 AM
Concatenate two lines in one Orbix Shell Programming and Scripting 5 04-29-2010 05:40 PM
Splitting a list @list by space delimiter so i can access it by using $list[0 ..1..2] shriyer Shell Programming and Scripting 1 07-29-2009 03:05 PM
How to concatenate all files. s80bob UNIX for Dummies Questions & Answers 1 08-22-2005 05:20 PM
Asking on concatenate variable blueberry80 UNIX for Dummies Questions & Answers 3 07-25-2003 10:46 AM

All times are GMT -4. The time now is 06:59 PM.