How to pass multi-line text file contents using Windows cmd?

Viewed 43

I found this Rust script compress-cidr and looking to run it with a large list as a parameter.

In the .\target\release directory, I have compress-cidr.exe and test.txt. On the project's readme, there is an example call to Aggregate list functionality. I want to use the Aggregate list example against the text.txt file contents.

How can I run .\compress-cidr.exe -6 -a %textFileContents% ?

1 Answers

This program expects its input on standard input. Cmd supports the same basic I/O redirection as Unix shells, including <FILENAME to redirect standard input from a file and >FILENAME to redirect standard output to a file.

cd target\release
compress-cidr -6 -a <test.txt
Related