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
Cut display multiple lines of output cbo0485 Shell Programming and Scripting 2 08-31-2009 04:08 PM
How do I capture multiple lines of the status output of a command? zzz1528 Shell Programming and Scripting 2 06-19-2009 12:48 PM
sed find and replace multiple lines supersimha Shell Programming and Scripting 6 04-04-2009 03:35 AM
using tr to put multiple lines of output into one line otes4 Shell Programming and Scripting 3 02-18-2008 11:30 AM
Display multiple output lines kingofprussia UNIX for Dummies Questions & Answers 5 05-23-2007 08:56 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 5.00 average. Display Modes
  #1 (permalink)  
Old 2 Weeks Ago
Scrutinizer Scrutinizer is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 597
Banking on the fact that all literals are in single quotes you could also use:
Code:
grep -o "'.*'" infile|xargs -n2|tr -d ' '
  #2 (permalink)  
Old 2 Weeks Ago
danmero danmero is offline Forum Advisor  
  
 

Join Date: Nov 2007
Location: 45.48-73.63
Posts: 1,420
What about:
Code:
awk -F[\'\ ] '/VAR1/{x=$3}/VAR2/{print x $3}' inFile
Reply

Bookmarks

Tags
awk, concatenate, multiple, pattern, sed

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 11:25 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