[英]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.