How do you join two strings. I have two strings in 2 differnent vars. How can I join this and assign it to another var in bash?
Printable View
How do you join two strings. I have two strings in 2 differnent vars. How can I join this and assign it to another var in bash?
sed or awk?
Can't help with any code though ;)
Maybe:
Code:man awk
-v var=value assigns value to program variable var.
Concatenation is easy and intuitive in bash:
$ a=hip
$ b=hop
$ ab=$a$b
$ echo $ab
hiphop
Check out the link in my sig for a great bash reference.
drChuck
Thanks a lot. I did try that (in a different sort of way) I used
$c= $a $b
because I needed a space in between. Now I use
$c= $a$space$b.
$a=cow
$b=tipping
$complete=$a" are not for "$b
echo $complete
cows are not for tipping
hlrguy