[英]awk on windows - print fields - quotes as delimiter
[英]awk cannot print strings on windows
有什么我做错了吗?
这给出了 output:
echo "hello world" | awk '{ print $0 }'
这不会:
echo "" | awk '{ print "hello world" }'
echo "" | awk '{ print "hello world" }'
( awk 'BEGIN{ print "hello world" }'
也没有)
这是 windows 上的 gnu awk。
出于这个问题的目的,我想做的就是打印一个字符串。 This runs as expected on WSL/MSYS etc., but doesn't produce output when on windows (using powershell, with awk from git's linux tools and with awk installed from choco, same result. )
我在堆栈溢出上找不到有关此特定问题的任何问题,但在 windows 与 linux 上处理字符串的方式可能存在简单的区别?
请参阅打印文档,另请参阅PC using documentation ,它处理行尾但未提及字符串差异。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.