I used to be able to handle piping just fine, but recently I’ve been having problems with Bash truncating output when it’s piped into another command. What could be causing this?
I'm using Bash on Mac OS X 10.11.1.
The command I’m using, in this example is leveraging the Microsoft Azure Cross-Platform (xPlat) CLI Tool, which runs on top of Node.js:
azure provider list --json | pbcopy
Actual Pipeline Output Received
Commands such as jsawk
or pbcopy
are only actually seeing this:
jsawk: JSON parse error: '[
{
"resourceTypes": [
{
"apiVersions": [
"2015-10-31",
"2015-01-01-preview"
],
"locations": [
"Japan East",
"East US 2",
"West Europe",
"Southeast Asia",
"South Central US"
],
"properties": {},
"name": "automationAccounts"
},
{
"apiVersions": [
"2015-10-31",
"2015-01-01-preview"
],
"locations": [
"Japan East",'
azure provider list --json | less
-- does your data get truncated?less outfile
...azure ... 2>&1 | less
2>&1 | less
redirection, and it's still truncated there.