xml - How to append one file that includes '< >' to another in bash script -


is there way append 1 file in bash script without complaining < > characters? i'm trying append file contains xml keeps throwing

syntax error near unexpected token 'newline'

'<mytag>'

the operation myfile.txt >> otherfile.xml

i know they're placeholder characters haven't been able turn results on making them interpreted literals

you need use cat:

cat myfile.txt >>otherfile.xml 

otherwise, you're trying run myfile.txt executable; problem has nothing arrow-bracket characters embedded within file's contents.


by way -- xml documents can legally contain single root, , not allowed have content outside of root, new file isn't valid xml.


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -