Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi Gurus,
I use below script to add header and trailer to files in a folder. When executed, it is removing the " of 4.5 & yyy.xsd from the header. Can I know how to preserve quotes?Thanks,
for i in *.xml # whatever pattern matches in your case
do
mv -i "$i" "$i.bak"
{
printf "%s\n" "<XML version="4.5" xsdType="yyy.xsd">"
cat "$i.bak"
printf "%s\n" "</XML>"
} > "$i"
done

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |