To make scripts more readable I would like to break things up on multiple lines. Is this possible in PowerShell's dot notation?
For example, take this:
(GC myfile.txt).Replace('a',b').Replace('c','d').Replace('e','f') | SC newfile.txt
And write it like this:
(GC myfile.txt).Replace('a',b')
.Replace('c','d')
.Replace('e','f') |
SC newfile.txt
I have tried using backticks (`) and they don't work. Are there any options? I guess assume PowerShell v3+
I found the same issue, the easiest way to solve it is to place the point before breaking the line
(GC myfile.txt).Replace('a',b').
Replace('c','d')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With