How do I concatenate two text files in PowerShell?

前端 未结 11 1972
没有蜡笔的小新
没有蜡笔的小新 2020-11-28 03:17

I am trying to replicate the functionality of the cat command in Unix.

I would like to avoid solutions where I explicitly read both files into variables

11条回答
  •  伪装坚强ぢ
    2020-11-28 03:49

    You can do something like:

    get-content input_file1 > output_file
    get-content input_file2 >> output_file
    

    Where > is an alias for "out-file", and >> is an alias for "out-file -append".

提交回复
热议问题