1

How to use variables in 'sed' append command?

view story
linux-howto

http://www.unix.com – HELLO!! I'm trying to pass a variable with in the 'sed' command (which would add some piece of code to file at a particular line). We can use Code: sed '{line-number}a\ alfjaljf\ aslfjsfsjafl\ adlfjaf\' file.txt If file.txt is Quote: <Property> <name>abc</name> <value>10</value> </Property> <Property> <name>xyz</name> <value>23</value> </Property> <Property> <name>uvw</name> <value>08</value> </Property> (HowTos)