brittonv
asked on
Combine Vars in Powershell into new Var
I am trying to combine variables in a script into a single varilabe.
So say My Script has set:
$a =1
$b =hello
$c = World
I want my $result to be "1 hello World"
I tried things like
$result = $a $b $c
So I can just call on $result
Extra credit how do I set the $result to be "1.hello world!"
Thanks
So say My Script has set:
$a =1
$b =hello
$c = World
I want my $result to be "1 hello World"
I tried things like
$result = $a $b $c
So I can just call on $result
Extra credit how do I set the $result to be "1.hello world!"
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Or more "powershellish" solution:
$result = "$a $b $c"
and
$result = "$a.$b $c"
$result = "$a $b $c"
and
$result = "$a.$b $c"
ASKER