I use following awk script to do so,
for line in $1
do
grep -F ".js" $1 | awk '{print $7}' | sort -u
done
the out put is almost there:
/blog/wp-includes/js/swfobject.js?ver=2.2
/fla/AC_RunActiveContent.js
/include/jquery.js
/include/jquery.jshowoff2.js
/include/jquery.jshowoff.min.js
/include/js/jquery.lightbox-0.5.js
/scripts/ac_runactivecontent.js
I tried piping: cut -d "/" -f5 intead of awk, but parts of script name are cut off as well.
ac_runactivecontent.js HTTP
AC_RunActiveContent.js HTTP
jquery.jshowoff2.js HTTP
jquery.jshowoff.min.js HTTP
jquery.js HTTP
js
wp-includes
How would I go about extracting from the pattern .js to the delimiter "/" so that I only get the script file name:
swfobject.js
AC_RunActiveContent.js
jquery.js
jquery.jshowoff2.js
jquery.jshowoff.min.js
jquery.lightbox-0.5.js
ac_runactivecontent.js