The bottom of
help decoderawtransaction shows you how to execute the command using JSON-RPC via curl:
curl --user myusername --data-binary \
'{"jsonrpc": "1.0", "id":"curltest", "method": "decoderawtransaction", "params": ["hexstring"] }' -H 'content-type: text/plain;'\
http://127.0.0.1:8332/
You can put the
{"jsonrpc":... stuff into a file (omit the single quotes) named for example TEMPFILE and then change the command to:
curl --user myusername --data-binary @TEMPFILE -H 'content-type: text/plain;' http://127.0.0.1:8332/
This requires that you set an RPC user and password in your bitcoin.conf. Change "myusername" above to your actual RPC user.
Since the data is in a file and never passed through the shell, I think that this should work, though I haven't tested it.