Category: Unix
-
PHP – Collapse multiple line drops to a single line drop
If you need to clean up some input by removing multiple new line drops and replace it with a single new line drop, for example, making this piece of text: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam ac elit at elit viverra mollis. Cras tincidunt leo eleifend purus fermentum. Look like this:…
-
Logging telnet (Or anything else on a Linux/Unix shell)
I had some web server acting funny the other day so I decided to go Rambo style and get a page manually using telnet. I also wanted to save the output of the entire client/server negotiation for later analysis. The Unix command script is just for that, it will run telnet (or any other shell…