Create bash file check_status.sh
with below content:
geth --exec 'var s = eth.syncing; console.log("\n------------ GETH SYNCING PROGRESS\nprogress: " + (s.currentBlock/s.highestBlock*100)+ " %\nblocks left to parse: "+ (s.highestBlock-s.currentBlock) + "\ncurrent Block: " + s.currentBlock + " of " + s.highestBlock)' attach http://127.0.0.1:8545
# source: https://ethereum.stackexchange.com/questions/394/how-can-i-find-out-what-the-highest-block-is
Remember change mode execute for this file:
chmod +x ./check_status.sh
Then run:
./check_status.sh