'add flow to opendaylight using curl

I want to add a simple flow which match the input port and output the packet on the other port. I wrote this flow

<flow xmlns="urn:opendaylight:flow:inventory"> <strict>false</strict> <instructions> <instruction> <apply-actions> <action> <output-node-connector>1</output-node-connector> </action> </apply-actions> </instruction> </instructions> <match> <in-port>0</in-port> </match> <flow-name>flow</flow-name> </flow>

but I get this error bash: syntax error near unexpected token `<

this is how i write the command in terminal

curl -u admin:admin -H 'Content-Type:application/xml' -X PUT -d <flow xmlns="urn:opendaylight:flow:inventory"> <strict>false</strict> <instructions> <instruction> <apply-actions> <action> <output-node-connector>1</output-node-connector> </action> </apply-actions> </instruction> </instructions> <match> <in-port>0</in-port> </match> <flow-name>'flow'</flow-name> </flow> 'http://192.168.19.132:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:2/table/0/flow/1'

any help would be appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source