![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| Guest | echo output Hello again, i think i have another basic question. i will make a array like this: $mn = 123 $x = echo $mn, ($mn)STRING... i want that my out looks like this: 123 123STRING..., but the STRING... is interpreted as the third part of the array. It looks like this 123 123 STRING... What can i do? THX |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: echo output $nm = 123 $x = $nm,"$nm `bSTRING" You dont need echo and `b is a backspace. If you use "" variables are expanded. "Jens Diekers" <JensDiekers@discussions.microsoft.com> wrote in message news:CEA606D9-F2FF-45ED-9533-2CD77929F0B0@microsoft.com... > Hello again, > > i think i have another basic question. > > i will make a array like this: > > $mn = 123 > $x = echo $mn, ($mn)STRING... > > i want that my out looks like this: > 123 > 123STRING..., but the STRING... is interpreted as the third part of the > array. It looks like this > 123 > 123 > STRING... > > > What can i do? > > THX |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: echo output On Aug 13, 7:34 am, Jens Diekers <JensDiek...@discussions.microsoft.com> wrote: > Hello again, > > i think i have another basic question. > > i will make a array like this: > > $mn = 123 > $x = echo $mn, ($mn)STRING... > > i want that my out looks like this: > 123 > 123STRING..., but the STRING... is interpreted as the third part of the > array. It looks like this > 123 > 123 > STRING... > > What can i do? > > THX Personally, I like to use this syntax for simple variable substitution: PS> $s = "string" PS> "${s}test" stringtest Note the use of curly braces to delimit the variable name. However, this doesn't work for grabbing an object's property: PS> "${s.length}test" test Doh. So in this case, I use a new evaluation context like so: PS> "$($s.length)test" 6test They're ordinary brackets this time, not the curly ones. Hope this helps, - Oisin |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Speaker Echo | Vista General | |||
| Speaker Echo | Vista hardware & devices | |||
| How to save output of echo to a file or omit using echo and save it | VB Script | |||
| echo cancellation | Vista General | |||
| Any Way To Get Rid Of The Echo? | Vista music pictures video | |||