Hello powershell friends .
First: Sorry for my bad english but I hope you understand what I meen.
This is my txt file (One separating spaces per line) - Example:
3/aaaaa 6
a/bbbbb 12
td/23d234f 101
t12s/65464dsf2 124
t5/rsdaad 161
124tz/weq 188
3ds/543 200
65aa/4423tz 225
Than I have split my txt file:
- TXT File
3/aaaaa
a/bbbbb
td/23d234f
t12s/65464dsf2
t5/rsdaad
124tz/weq
3ds/543
65aa/4423tz
and my second TXT file:
6
12
101
124
161
188
200
225
Ok. I have 2 new txt files.
Than I’m looking for numbers in the second file.
The solution write it to a third txt file .
12
101
124
161
188
200
No problem. I have now 3 files but how can I make this to one now?
That is what is needed in the end:
a/bbbbb 12
td/23d234f 101
t12s/65464dsf2 124
t5/rsdaad 161
124tz/weq 188
3ds/543 200
First I think I generate linenumber (first and second txt file) but this is not a option because
this make problems by my number search into the second file.
Not a option:
$Linenumbers =(Get-Content .\example.txt)
$a = 0
$Linenumbers | Foreach-Object { $a++; "" + $a + ": " + $_ }
I hope someone can tell me how the lines can be put back together.
I am a beginner with powershell. Sorry.
Thanks.