Hey guys, first post here!
I am working on a script and my web guy wants it to output with a very specific format. I'm very close and have my echos printing most of my stuff, but I am needing quotes around the output value from a command.
I'm try to get quotes around the temp (040 here)
My script reads like...
Code:
echo -n "\"drive_a\": "
/usr/sbin/smartctl --all -d ata /dev/sda | grep -i temperature | awk '{ print $4 }'
echo skips the new line (-n) and everything is good there with displaying its quotes, I just need to get the smartctl output to be in quotes.
Thanks guys!