Solved

Get value without quotes using curl and sed

Posted on 2013-11-08
1
238 Views
Last Modified: 2013-11-08
This does what I want except I do not want the quotations at the beginning and end:
curl -sk 'https://zuhqtr5.couchappy.com/site/www/' | sed -e 's/[{}]/''/g' | awk -v RS=',"' -F: '/^_rev/ {print $2}'

Open in new window

How can I get the same results without the quotes?
0
Comment
Question by:hankknight
1 Comment
 
LVL 19

Accepted Solution

by:
simon3270 earned 500 total points
ID: 39633482
If you want all quotes removed from the string, add:
    | tr -d "'"'"'
to the end of the command - that deletes all double and single quotes
(it's double single double single double single)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the years I've spent many an hour playing on hardened, DMZ'd servers, with only a sub-set of the usual GNU toy's to keep me company; frequently I've needed to save and send log or data extracts from these server back to my PC, or to others, and…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question