howto place in one line output from two functions

Hi

I would like to place in one line output from two functions. Both functions return text with print cmd.

When I place above code in script it will place them in series.
e.g.

     1  #/bin/ksh
     2
     3  function1()
     4  {
     5          print "My name is"
     6          print "His name is"
     7
     8  }
     9
    10  function2()
    11  {
    12          print "Norbert Jakubczak"
    13
    14  }
    15
    16
    17  function1;function2

You are missing a ! in the 1st line. Use echo, not print. print is for a different purpose in this case (check man print if you want to know).

A possible way:

$> cat mach.ksh
#!/usr/bin/ksh

function1()
{
        echo one
        echo two
}

function2()
{
        echo three
}

printf "%s\n" "`(function1; function2)| tr -s '\n' ' '`"

exit 0
$> ./mach.ksh
one two three

---------- Post updated at 09:38 AM ---------- Previous update was at 09:33 AM ----------

or without tr:

$> cat mach.ksh
#!/usr/bin/ksh

function1()
{
        echo one
        echo two
}

function2()
{
        echo three
}

VAR=`(function1; function2)`
echo $VAR

exit 0
$> ./mach.ksh
one two three

Depending on OP's need this should also work:

function1()
{
        VAR+="one "
        VAR+="two "
}

function2()
{
        VAR+="three"
}

function1; function2;echo $VAR
{ function1;function2;}|xargs

or

echo $(function1;function2)
cat <<<$(function1;function2)