LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-21-2002, 03:06 AM   #1
xanthium
Member
 
Registered: Apr 2001
Location: Bombay ( INDIA )
Distribution: RedHat 7.x
Posts: 218

Rep: Reputation: 30
Question string concatenation in AWK


Hi ,

I was wondering how to accomplish this in awk, can someone help ? ( Yes i DID read the man pages but didnt get much help)

var1="I"
var2="love"
var3=Linux #Note that the value is WITHOUT inverted comma

now i want to concatenate the contents the contents of above mentioned three variables and put it into another variable called var4 so in the end the value of variable "var4" should be equal to

"I love Linux"

i hope iam clear with my query.

regards,
Xanthium



:smash:
 
Old 04-22-2002, 05:41 AM   #2
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
var4=var1 " " var2 " " var3
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postgresql aggregate text functions - concatenation, merge rjlee Programming 0 07-13-2005 05:10 PM
[Bash] Concatenate string using awk senorsnor Programming 7 05-05-2005 01:38 AM
PERL: concatenation of variables issue randomx Programming 2 01-16-2005 05:52 PM
C....Search a string for a string Scrag Programming 4 06-14-2004 05:15 PM
java test if string in string array is null. exodist Programming 3 02-21-2004 02:39 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration