Blog Archives

2 Oneliners For Removing All The Commented Lines In A File

This two oneliners display all the lines in a text file, except the commented lines (lines starting with #). The blank lines are ignored. The output can also be redirected to some text files. See the other oneliner articles here.

Tagged with: , , , , ,
Posted in The Linux and Unix Articles!

3 Text Formatting Tricks: remove duplicate lines, remove empty lines, convert upper cases to lowers

In this article I will show you 3 basic text formatting tricks. It is very usefull to know how to manipulate text files. Remove repeated lines in a file: I have this file: $ cat textfile sample line1 sample line1

Tagged with: , , , , , , , , ,
Posted in The Linux and Unix Articles!
Subscribe

  

Subscribe to get the latest Linux news and how to guides directly on your e-mail!