English 中文(简体)
How do I get the output of a Perl script into a file from the DOS prompt?
原标题:

I m generating a large XML document via a Perl script in a command window, however, currently it s printing the document to standard out. The Perl script modifiers do not have a switch to allow to write to a file, so I m curious how to take an input string and write to a file via the base command shell.

My current order of operations:

perl dtd2xsd.pl someBigSchema.dtd

The above returns the requested XSD contents, I m just stuck on getting that into a file.

最佳回答

Simply redirect the output to a file.

perl d2dxsd.pl someBigSchema.dtd > somefile.xsd
问题回答

暂无回答




相关问题
Command Line Parameters

I m trying to add my file in Visual Studio as command line parameters. I know my code works since when I use fopen("whole path here", "r"), it runs. I then add the file as a command line parameter ...

Read from File, or STDIN

I ve written a command line utility that uses getopt for parsing arguments given on the command line. I would also like to have a filename be an optional argument, such as it is in other utilities ...

R - capturing elements of R output into text files

I am trying to run an analysis by invoking R through the command line as follows: R --no-save < SampleProgram.R > SampleProgram.opt For example, consider the simple R program below: mydata =...

热门标签