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:
Remove newlines from output.
One character shorter than awk /./ filename and doesn't use a superfluous cat.
To be fair though, I'm pretty sure fraktil was thinking being able to nuke newlines from any command is much more useful than just from one file.
There are 2 alternatives - vote for the best!
Pipe any output to "grep ." and blank lines will not be printed.
?Cat and grep? You can use only grep ("grep \. filename"). Better option is awk.
If you can do better, submit your command here.
You must be signed in to comment.