Thursday, October 14, 2010

Shell sample commands

Need to create a list of all the unique package names explicitly imported
by your Java code? The following stores it in a file 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)

No comments:

Blog Archive