How can I remove any white space if any after parsing from JSON? whereami -r Parse result without sed. { "ip": "95.16.15.10", "country_code": "US", "country_name": "United States", "region_code": "NY", "region_name": "New York", "city": "The Bronx", "zip_code": "10473", "time_zone": "America/New_York", "latitude": 40.822, "longitude": -73.86, "metro_code": 501 } Working one but with space. whereami -r | sed […]
- Tags 'country_code': 'US', 'country_name': 'United States', "city": "The Bronx", "latitude": 40.822, "longitude": -73.86, "metro_code": 501 } Working one but with space. whereami -r | sed -rn 's/(^.*city": ")(.*)(".*$)/\2/p' The Bronx Sort of working JSON res, "metro_code": 501 What I'm trying to accomplished TheBronx, "region_code": "NY", "region_name": "New York", "time_zone": "America/New_York", "zip_code": "10473", How can I remove any white space if any after parsing from JSON? whereami -r Parse result without sed. { "ip": "95.16.15.10", TheBronx "zip_code": "10473"