Quantcast
Channel: Active questions tagged jq - Stack Overflow
Viewing all articles
Browse latest Browse all 524

jq - difference in behavior between Linux and Windows version

$
0
0

Using jq 1.7 in Linux and Windows. The following run fine in Linux (version 5.10.228-219.884.amzn2.x86_64), but gives error "'.[]' is not recognized as an internal or external command, operable program or batch file" in Windows 11 command prompt or Powershell:

aws dms describe-replication-tasks --filter Name=replication-task-id,Values=TASKNAME --output json | jq '.ReplicationTasks | .[] | .TableMappings |= fromjson | .ReplicationTaskSettings |= fromjson | delpaths([ ["ReplicationTaskArn"],["ReplicationTaskStartDate"],["ReplicationTaskStats"],["Status"],["StopReason"],["ReplicationTaskCreationDate"],["ReplicationTaskSettings","Logging","CloudWatchLogGroup"],["ReplicationTaskSettings","Logging","CloudWatchLogStream"],["RecoveryCheckpoint"]]) | .TableMappings |= tostring |.ReplicationTaskSettings |= tostring'> TASKNAME.json

I've tried various tweaks, like replacing the ticks with quotes, but nothing seems to get this to run on Windows.

I expected the Windows command to produce the same output file as the Linux command did.


Viewing all articles
Browse latest Browse all 524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>