You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PS C:\Users\user1> date | .\goawk.exe {'print $1'}
flag provided but not defined: -encodedCommand
PS C:\Users\user1> date | .\goawk.exe'{print $1}'
Thursday,
If the quotes are inside the curlies {}, it complains about flag provided but not defined: -encodedCommand
The text was updated successfully, but these errors were encountered:
Hi @anmathew, I think you'll find that the first format (with the quotes inside the curlies) isn't correct, on either Windows/Powershell or Linux. The second example is correct: use a single-quoted string to include the entire AWK program (the curlies are part of the AWK source).
In the first example, Powershell must be passing -encodedCommand as a command argument to GoAWK, hence the error message.
Sorry @anmathew, but this is a shell quoting issue -- a difference in how Powershell vs Unix shells handle argument parsing and quoting (not a Windows vs Linux thing as such). The quotes outside the curlies is how everyone does it and works fine on both platforms, so I recommend just using that.
If the quotes are inside the curlies
{}
, it complains aboutflag provided but not defined: -encodedCommand
The text was updated successfully, but these errors were encountered: