Computing.Net > Forums > Unix > Add header and footer

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Add header and footer

Reply to Message Icon

Name: poornimajayan
Date: November 6, 2009 at 12:45:15 Pacific
OS: KSH
Product: Creative Vado pocket video cam pink camcorder
Subcategory: Software Problems
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: poornimajayan
Date: November 6, 2009 at 13:20:44 Pacific
Reply:

Ok. Using \" worked for me.


0
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: Add header and footer

Strip header and footer record? www.computing.net/answers/unix/strip-header-and-footer-record/3481.html

split a file with headers and trail www.computing.net/answers/unix/split-a-file-with-headers-and-trail/8235.html

Unix sort www.computing.net/answers/unix/unix-sort/7210.html