That looks a bit whack.
You could try adding it to a bash script and run it that way. A better exercise would be to take half hour and learn to execute transactions manually:
run this to get your utxo data (utxo, TxIx and lovelace amount) - do this from hot node
cardano-cli shelley query utxo --address [payment-addrress] --mainnet
calculate hom much ADA you will have left in payment address after transaction
expr [lovelaces in utxo] - [transaction fee]
build transaction - do this on cold node:
cardano-cli shelley transaction build-raw \
–tx-in [utxo-string]#[TxIx] \
–tx-out $(cat payment.addr)+[utxo-lovelaces] - [transaction-fee] \
–ttl [current-slot + 100000] \
–fee 200000 \
–out-file tx.raw
sign transaction - do this on cold node:
cardano-cli shelley transaction sign \
–tx-body-file tx.raw \
–signing-key-file payment.skey \
–mainnet \
–out-file tx.signed
submit transaction (bring tx.signed from cold machine to hot machine):
cardano-cli shelley transaction submit \
–tx-file tx.signed \
–mainnet
In this example we use a transaction fee of 200,000 lovelaces.
Your friend, FROG