Why is “<” input redirect not implemented in PowerShell?

后端 未结 2 1099
礼貌的吻别
礼貌的吻别 2020-12-03 07:01

Why is input redirection not implemented in PowerShell?

To do something like this:

mysql -u root < create.sql

I had to switch to

2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-03 07:12

    I don't think MySQL will accept PowerShell objects piped to it - as Stephan says though, you could use Get-Content and pipe it to the next command.

    Check out Stack Overflow question Is PowerShell ready to replace my Cygwin shell on Windows? for reasons on why they haven't copied Unix shells.

提交回复
热议问题