addr=$(./bitcoin-cli getnewaddress) && ./bitcoin-cli dumpprivkey $addr| qrencode -o ~/Desktop/$addr.privkey.png && echo "private key dumped for: "$addr
See http://altoidnerd.com/2015/09/06/how-import-a-bitcoind-address-private-key-into-breadwallet-ios-with-a-qr-code-using-bitcoin-core-for-ubuntu-linux/
Keep in mind the above snippet generated a new address. You can use and address you have in mind e.g. "address":
addr="address" && ./bitcoin-cli dumpprivkey $addr| qrencode -o ~/Desktop/$addr.privkey.png && echo "private key dumped for: "$addr
Or if you have the private key as a string = "privkey":
key="privkey"; echo $key | qrencode -o ~/Desktop/mykey.png && echo "private key qr mykey.png created for $key