Posts Tagged With: text

Install Package List

Tagged with: , , , , , ,

Install a list of packages from a text file.


cat packages.txt | xargs apt-get install
No Comments »

Replacing in Found Files

Tagged with: , , , , , ,

Replace one string by another in all file found by find.


find . -name *whatyouwant* -exec perl -pi.bak -e 's/TEXT_TO_REPLACE/TEXT_TO_REPLACE_IT_WITH/g' {} \;
No Comments »

Spell Check a Text File using Aspell

Tagged with: , , , , , ,

You can use Aspell to spell check of a text document using this command. It must be executed in a termial – as it has an console interface.


aspell check test.txt

Original Article

1 Comment »

Optimized Grep Searching

Tagged with: , , , , , , ,

Grep that searches recursively, ignores binary files, and doesn’t look inside Subversion hidden folders.


grep -Ir --exclude="*\.svn*" "pattern" *
No Comments »

Delete all \n chars in a file…

Tagged with: , , , , , , , ,

Delete all \n chars in a file…


tr -d "\n" 
No Comments »

Text type convert

Tagged with: , , , , , , ,

Convert a text file format from MSDOS to UNIX


dos2unix input_file output_file
No Comments »

Get the Plain Text Version of a Web Page

Tagged with: , , , , , , , ,

This command fetches a web page, converts it to text and shows it.


lynx -dump http://www.example.com/
No Comments »

Fix for Missing Fonts in Debian’s XMMS

Tagged with: , , , , , , , , , ,

If you have a debian system and the XMMS in that has a bug that hides the fonts in dailog, try this command…


dpgk-reconfigure locales
1 Comment »

Change Case

Tagged with: , , , , , ,

Convert from lower case to upper case


echo 'hello world' | tr '[:lower:]' '[:upper:]'
No Comments »

Remove Empty Lines

Tagged with: , , , , , , ,

Remove empty lines from a file using sed


sed '/^$/d' file.txt

Original Article

No Comments »