LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-14-2019, 01:12 PM   #1
Volcano
Member
 
Registered: Sep 2005
Posts: 221

Rep: Reputation: 15
what this jq command do ?


Can anyone please explain what does this command do ?

jq -r '.[].revision.s3Location | "\(.bucket) \(.bundleType) \(.key)"'
 
Old 08-14-2019, 01:29 PM   #2
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 2,598

Rep: Reputation: 634Reputation: 634Reputation: 634Reputation: 634Reputation: 634Reputation: 634
http://manpages.ubuntu.com/manpages/...man1/jq.1.html
 
Old 08-15-2019, 12:22 AM   #3
Volcano
Member
 
Registered: Sep 2005
Posts: 221

Original Poster
Rep: Reputation: 15
what this part does "\(.bucket) \(.bundleType) \(.key)"' ?
 
Old 08-15-2019, 01:14 AM   #4
Sefyir
Member
 
Registered: Mar 2015
Distribution: Linux Mint
Posts: 607

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Here's another help manual that the command itself refers

https://stedolan.github.io/jq/

You can check your version with

Code:
jq --version
 
Old 08-15-2019, 03:49 AM   #5
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,576

Rep: Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341
https://jqplay.org/ this may help you to understand
 
Old 08-15-2019, 04:32 AM   #6
individual
Member
 
Registered: Jul 2018
Posts: 267
Blog Entries: 1

Rep: Reputation: 210Reputation: 210Reputation: 210
Quote:
Originally Posted by Volcano View Post
what this part does "\(.bucket) \(.bundleType) \(.key)"' ?
It's a format string. It outputs the values of the "bucket," "bundleType," and "key" keys, all in a row. The \() is needed, otherwise it will literally print what is in quotes.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] [SOLVED] bash script: can echo command, command works if I type, but command doesn't work in script ... why? hopeless_n00b Linux - Newbie 10 07-12-2018 06:57 AM
Command Substitution: $(command) vs `command` penguinbody Linux - Newbie 9 04-15-2016 08:00 AM
bash: <command name> command not found smash Programming 5 03-13-2006 09:48 AM
How to recall an old command at the command prompt? J_Szucs Linux - Newbie 9 03-07-2003 01:29 AM
java command - "bash: java: command not found" ??? RedHat123 Programming 2 07-17-2002 12:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration