4 ms·
> alias json='| python -m json.tool' Is the beginning pipe intended? If I just run 'python -m json.tool' then it starts reading from stdin by itself (and works
by egwynn 11y ago
> alias json='| python -m json.tool'
Is the beginning pipe intended? If I just run 'python -m json.tool' then it starts reading from stdin by itself (and works as intended). And with the pipe, I can’t seem to make the alias work.
$ echo '{ "foo": 1234}' | json
-bash: syntax error near unexpected token `|'
$ json
-bash: syntax error near unexpected token `|'
- danwakefield 11y agoyeah, thats my bad, A recent addition and I must have copied too much of the command line when adding it.