1

I'm trying to run the following command on powershell:

C:\Users\amalj\OneDrive\Desktop\CS4023\labs\week07/findvals -r 5.6 -t 230.0 < C:\Users\amalj\OneDrive\Desktop\CS4023\labs\week07/mat.2x3

And it's showing up:

    At line:1 char:77
+ ... neDrive\Desktop\CS4023\labs\week07\findvals -r 5.6 -t 230.0 <C:\Users ...
+                                                                 ~
The '<' operator is reserved for future use.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : RedirectionNotSupported

How do I fix this?

NotTheDr01ds
  • 15,620
  • 5
  • 44
  • 70

1 Answers1

0

As it is part of a lab you might be able to change your findvars to simply accept an input file.

You could use Start-Process and the -RedirectStandardInput flag to make it work in a similar manner.

Another option might be to inverse your call and use the PowerShell Pipeline. An example of this would be to use Get-Content to read the file and pass the contain along using the pipeline to your findvars. Keep in mind that you might need to use -Raw depending on how your findvars operates.

Seth
  • 1,215
  • 15
  • 35