For a job, I need to retrieve values in a file extracted with curl -o in a .txt file
I explain, for the moment, I managed to extract from the JSON, the necessary information via cut. My problem is that I can't display it correctly: 6:12:46 AM 5:20:41 PM Sunrise is expected at and sunset at .
I would like in this format : Sunrise is expected at 6:12:46 AM and sunset at 5:20:41 PM
How to do it please ? For the moment here is my bash code :
#!/bin/bash
curl -o test.txt https://api.sunrise-sunset.org/json?lat=48.813875&lng=2.392521
SUNSET= cut -c 24-33 test.txt
SUNRISE= cut -c 46-55 test.txt
echo "Sunrise is expected at" $SUNRISE "and sunset at $SUNSET."
Thanks