bash one liners
Monday, December 12th, 2011Get a list of URLs for a website using wget: wget -r -nv -nd –delete-after “your-url-goes-here” 2>&1 | sed -n ‘/->/{/URL:/s/.*URL:\([^ ]*\).*/\1/;/^[ ]*$/d;p}’
Get a list of URLs for a website using wget: wget -r -nv -nd –delete-after “your-url-goes-here” 2>&1 | sed -n ‘/->/{/URL:/s/.*URL:\([^ ]*\).*/\1/;/^[ ]*$/d;p}’
Regularly I work with large CSV files and on one occasion had a need to figure out which line was the longest in the file. Of course there should be a one-liner bash script that can do this for us. I started here but none of the posted solutions did exactly what I want. So [...]