I have a file with :
STRING.STRING2.STRING3 = VALUE1 bla bla text bla bla
And i want to obtain something like this:
<string name="STRING.STRING2.STRING3">VALUE1 bla bla text bla bla</string>
using only shell commands like grep or sed and others
until now i reached to that:
TEMP=`cat $file |
sed '/^\#/d' $file
sed 's@=@">@'
sed 's@\.@_@g'
sed 's:(\\s){3}::g'`
echo "$TEMP " | sed 's@^@<string name="@' |
sed 's@$@</string>@'
(also the 5th doesnt work too well…)
If you use bash, can be done completely in the shell:
produces
Edit: to process a file