简体   繁体   English

Windows命令提示符下的gawk错误

[英]gawk error on windows command prompt

I am trying to run a perl script as shown below but am met with error as explained here. 我正在尝试运行如下所示的perl脚本,但遇到错误,如下所述。

$filenames = ls -l newdir|grep smlist|gawk -F" " '{ print \\$8 }' ; $ filenames = ls -l newdir|grep smlist|gawk -F" " '{ print \\$8 }' ;

Here is the error I get: 这是我得到的错误:

The system cannot find the path specified. 该系统找不到指定的路径。 gawk: '{ gawk: ^ invalid char ''' in expression gawk:表达式中的'{gawk:^无效字符'''

Please help out with possible solutions. 请提供可能的解决方案。

gawk , grep and ls are not Windows native commands. gawkgrepls不是Windows本机命令。

To use them in the way you have shown, you need them all installed in the current folder or in folders that are added to the PATH 要以显示的方式使用它们,需要将它们全部安装在当前文件夹或添加到PATH的文件夹中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM