hello All,
i have to two files package.today and package.yesterday , the extension of the files says what day the file belongs to .
contents of the file change little bit everyday .
i am taking only the package and sub package from the files
awk '/^[0-9+]/{print $0}' Packages.today
82
83
84
85
86
+--- 21
+--- 82
87
88
89
90
900
901
903
904
905
909
91
+--- 11
+--- PREVIEW PACKAGE
92
93
94
95
950
96
97
98
+--- 11
99
awk '/^[0-9+]/{print $0}' Packages.yesterday
82
83
84
85
86
+--- 21
+--- 82
87
88
89
90
900
901
903
904
905
909
91
+--- 11
92
93
94
95
950
96
97
98
+--- 11
99
The main package starts from the line begining and sub package begins with +--- , both the package names can be number and char
the difference between yesterdays and todays package list is
diff tmp.today tmp.yesterday | grep +--- | sed 's/<//g;s/+---//g;s/^ *//g'
PREVIEW PACKAGE
so "preview package" is a new sub package added in under the main package 91
i want to know the number what main package is the new sub package added ( here its is 91)
i may be following a longer path using diff command , all i want to know the main package number the sub package added,