Randomize the line numbers in a text file:
python -c "import random, sys; lines = open(sys.argv).readlines(); random.shuffle(lines); print ''.join(lines)," D:\folder\test.txt > D:\Folder2\test_rand.txt
Count Unique lines in a large file (works on Ubuntu):
sort input.txt | uniq -c > output.txt
Sorts file with highest frequency lines at the top:
sort input.txt | uniq -c | sort -bgr > output.txt
Compare text Files:
Find line numbers in second file that are not present in the first file.
i.e. compare first and second file and give list of the words from second file that is not present in the first file.
Basically looks for all lines in second-file.txt which don't match any line in first-file.txt. Might be slow if the files are large.
grep -Fxv -f first-file.txt second-file.txt
Add a tab after a find string (e.g. after the first group of numbers at each line)
Alll Devanagari (Hindi/Konkani) characters that can be found via a regular expressions :
Find Invalid Words that have two consquent invalid diacritics in Hindi (for Notepad++):
Find non-ASCII values (which is roughly unicode values:
Replace all the Arabic digits with that of Hindi/Devanagari digits in Notepad++
Find String: (1)|(2)|(3)|(4)|(5)|(6)|(7)|(8)|(9)|(0)
Replace with: (?1१)(?2२)(?3३)(?4४)(?5५)(?6६)(?7७)(?8८)(?9९)(?10०)