#!/bin/bash
#--------------------------------------------------------------------
+#./check_dup.sh > ~/test.txt
+#cat ~/test.txt | sort > ~/test1.txt
+#cat ~/test.txt | sort -u > ~/test2.txt
+#vimdiff ~/test1.txt ~/test2.txt
+#--------------------------------------------------------------------
filelist=`ls ./data/*.xml`
for file in $filelist
do xmlstarlet sel -t -v "/vconfkeylists/vconfkey/@name" $file | sed 's/^ *//; s/ *$//; /^$/d'
done
-#./check_dup.sh > ~/test.txt
-#cat ~/test.txt | sort > ~/test1.txt
-#cat ~/test.txt | sort -u > ~/test2.txt
-#vimdiff ~/test1.txt ~/test2.txt
+
<email/>
<comment><![CDATA[ ]]></comment>
</vconfkey>
- <vconfkey type="string" name="db/browser/user_agent_profile_4G" headeronly="true" layer="" readPriv="" writePriv="">
- <header>VCONFKEY_BROWSER_USER_AGENT_PROFILE_4G</header>
- <val/>
- <creator/>
- <email/>
- <comment><![CDATA[ ]]></comment>
- </vconfkey>
<vconfkey type="int32" name="memory/pwlock/state" headeronly="true" layer="" readPriv="" writePriv="">
<header>VCONFKEY_PWLOCK_STATE</header>
<val/>
--- /dev/null
+#!/bin/bash
+filelist=`ls ./data/*.xml`
+
+for file in $filelist
+do
+ xmlstarlet ed -d "/vconfkeylists/vconfkey/@uid" $file > $file.temp
+ mv $file.temp $file
+ xmlstarlet ed -d "/vconfkeylists/vconfkey/@gid" $file > $file.temp
+ mv $file.temp $file
+done