0

so, I have the example code here:

#!/bin/bash
clear

curl -s  https://www.cnbcindonesia.com/market-data/currencies/IDR=/USD-IDR |
html2text |
sed -n '/USD\/IDR/,$p' |
sed -n '/Last updated/q;p' |
tail -n-1 |
head -c+6 && printf "\n"

exit 0

this should print out some number range 14000~15000

lets start from the very basic one, what I have to do in order to print result + 1 ? so if the printout is 14000 and increment it to 1 become 14001. I suppose the result of the html2text is not calculatable since it should be something like string output not integer.

the more advance thing i want to know is how to calculate the result of 2 curl results?

4

1 に答える 1