Posts: 27
Threads: 8
Joined: Jul 2012
09-24-2012, 10:02 AM
(This post was last modified: 09-25-2012, 04:18 PM by aaaaa1.)
hi guys!
can somebody help me to clean my dictionaries?
in my dicts i can see many lines like on next screenshot:
http://www.up-urs.net/files/13484728211.png
in which way i can remove lines contains unprintable characters from my lists?
tryed
sed -i '/\x00/d'
from x00 to x09, its work fine, but for 011 to 031 chars not work
also with
sed '/\011/d'
sed "/\c K/d"
sed '/'"$(printf '\011')"'$/d'
have no luck
help, please BASH Guru!
Posts: 5,185
Threads: 230
Joined: Apr 2010
you tried strings?
strings < in.dict > out.dict
Posts: 27
Threads: 8
Joined: Jul 2012
09-24-2012, 12:31 PM
(This post was last modified: 09-24-2012, 12:34 PM by aaaaa1.)
Yes!
strings < in.dict > out.dict remove all from list
may by need some options?
???
Posts: 27
Threads: 8
Joined: Jul 2012
Posts: 2,936
Threads: 12
Joined: May 2012
nobody know what? you said "yes!" and that strings removed everything from the list. did you have another question?
Posts: 27
Threads: 8
Joined: Jul 2012
You right, sorry, my reply was not correct.
this function remove ALL content from list, not only lines what i need to remove.
I do not know why?
Can somebody show me any working example how to remove lines with unprintable characters?
Again very sorry, i just install my LinuxMint 13 Mate (2 weeks ago) and im newbie in this OS.
And my "Yes!" means - i tried this strings and have negative result.
Still need help!
Posts: 2,936
Threads: 12
Joined: May 2012
it's kind of a tricky subject and requires some experience.
the issue might be solely with your language settings. just because your system is unable to represent a character doesn't mean it's unprintable. it could also be why strings and other console utilities are failing.
can you show us the output of ''echo $LANG'' and ''file <hashfile>''?
Posts: 27
Threads: 8
Joined: Jul 2012
echo $LANG
ru_UA.UTF-8
file hashfile
hashfile: ERROR: cannot open `hashfile' (No such file or directory)
???
where must to be file hashfile?
Posts: 414
Threads: 14
Joined: Mar 2012
He meant your dictionary file.
Posts: 27
Threads: 8
Joined: Jul 2012
OK, sorry
03.txt: ASCII text