1.how do I substitute a variable output within another command .I want to use the date and portfolio values within each grpc call. I also want to print the output of the grpc call and also store it in a variable for further processing.
2.I get json like result back, is there a way to pretty print it in bash?
Quite new to bash scripting.
portfolios="1739719,1714630"
IFS=',' read -ra PIDS <<< "$portfolio"
MYDATE=$(date -d '09/04/2020 00:00:00' +"%s")
echo $MYDATE
for i in "${PIDS[@]}"; do
mycall=$(grpc_cli call trades:10443 com.mycom.Service.GetByPortfolioId 'source_system:CONTR portfolio_id:$PID as_of: {seconds: $MYDATE nanos: 000000000}')
echo $mycall
done