MJang wrote: > > Examples in my target list: > > "/path/to/file/abc.jsp"; > some java declarative VARIABLE = "something.jsp"; > * other/path/whatever.jsp > = "/path/to/file/other.jsp"; > "/messy/path/abTestRest.jsp?metasomething=" + > > Ideally, from whatever I run, I'd get the following output: > > abc.jsp > something.jsp > whatever.jsp > other.jsp > abTestRest.jsp > > Help will be appreciated.
Assuming your original target list is in a file called file_list: sed 's,.*[^A-Za-z]\(.*\.jsp\).*,\1,' file_list > extracted_list E.g.: #cat file_list "/path/to/file/abc.jsp"; some java declarative VARIABLE = "something.jsp"; * other/path/whatever.jsp = "/path/to/file/other.jsp"; "/messy/path/abTestRest.jsp?metasomething=" + #sed 's,.*[^A-Za-z]\(.*\.jsp\).*,\1,' < file_list abc.jsp something.jsp whatever.jsp other.jsp abTestRest.jsp _______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
