0
PS C:\Users\Tim\desktop\Practice> cmd \c python .\teststreams.py < input.txt

returns the following error message:

The '<' operator is reserved for future use.

Is there any way around this in Powershell or am I going to have to resort to DOS? It does work in DOS, though I would like to stay with Powershell

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
TimLayne
  • 124
  • 2
  • 13

2 Answers2

1

What are you even trying there by passing \c as an argument to cmd? Not that you need cmd at all:

Get-Content input.txt | python teststreams.py
Joey
  • 344,408
  • 85
  • 689
  • 683
0

PS C:\Users\Tim\desktop\Practice> Get-Content input.txt |python .\teststreams.py, I didn't add the python before, I initially used PS C:\Users\Tim\desktop\Practice> Get-Content input.txt | .\teststreams.py and it didn't work

TimLayne
  • 124
  • 2
  • 13