Need to create a list of all the unique package names explicitly imported
by your Java code? The following stores it in a ﬁle called "list."
grep ' ^import ' *. j ava |
sed -e' s/. *import *//' -e's/; . *$//' |
sort -u >list
(sed -e is used for giving multiple commands to sed)