remove the duplicates 78/69378/4
authorMyoungJune Park <mj2004.park@samsung.com>
Fri, 13 May 2016 03:12:16 +0000 (12:12 +0900)
committerMyoungJune Park <mj2004.park@samsung.com>
Fri, 13 May 2016 03:20:35 +0000 (12:20 +0900)
- update .sh utils

Change-Id: I5c221d17e1e965f45b9e19937b41b517fc1729f0
Signed-off-by: MyoungJune Park <mj2004.park@samsung.com>
check_dup.sh
data/vconf-internal-moved-from.xml
remove_uid_gid.sh [new file with mode: 0755]

index 316f48a..11bdae9 100755 (executable)
@@ -1,12 +1,14 @@
 #!/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
+
index 7f88cfc..9113873 100644 (file)
     <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/>
diff --git a/remove_uid_gid.sh b/remove_uid_gid.sh
new file mode 100755 (executable)
index 0000000..37927fc
--- /dev/null
@@ -0,0 +1,10 @@
+#!/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