commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Finds all the closing tags in a HTML document via non-greedy regex and adds a linefeed for easier reading/editing
sed -i.bak -r 's_(/[^>]*?>)_\1\n_g' filename.html
This will save a copy of filename.html as filename.html.bak and then add the linefeeds to the original file
There is 1 alternative - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.