On Sat, Nov 28, 2009 at 7:13 AM, Dotan Cohen wrote:
> I have a long binary file (about 12 MB) that I need to extract the
> text from via "strings". Naturally, there are a lot of junk lines such
> as these:
> pDuf
> #k0H}g)
> GoV5
> rLeY1
> TMlq,*
>
> Is there a way to grep the output of strings in
On Sun, Nov 29, 2009 at 11:14:58AM +0200, Dotan Cohen wrote:
> 2009/11/29 Andrew Sackville-West :
> > On Sun, Nov 29, 2009 at 01:22:15AM +0200, Dotan Cohen wrote:
> >> > will get the ones that start with capital alphas. if you want initial
> >> > caps *only* then:
> >> >
> >> > grep "^[A-Z][a-z]*$"
Dotan Cohen wrote:
>
> This means that only words that start with a caps are valid. I need
> "can start with a caps, but caps can be nowhere else". I got that like
> this:
> grep "^[A-Za-z][a-z]*$"
> However I think that there is a better way.
>
> This is a good exercise. I am bettering my regex
2009/11/29 Andrew Sackville-West :
> On Sun, Nov 29, 2009 at 01:22:15AM +0200, Dotan Cohen wrote:
>> > will get the ones that start with capital alphas. if you want initial
>> > caps *only* then:
>> >
>> > grep "^[A-Z][a-z]*$"
>> >
>> > would match those.
>> >
>>
>> Thanks. I meant that caps could
On Sun, Nov 29, 2009 at 01:22:15AM +0200, Dotan Cohen wrote:
> > will get the ones that start with capital alphas. if you want initial
> > caps *only* then:
> >
> > grep "^[A-Z][a-z]*$"
> >
> > would match those.
> >
>
> Thanks. I meant that caps could only be at the beginning of a word,
> not in
Dotan writes:
> Is there a way to grep the output of strings in order to only show
> lines that contain words found in the aspell dictionary?
Try this:
#!/bin/bash
strings "$1" | while read line
do
if [ ` echo "$line" | sed -e 's/[^a-zA-Z ]//g' | wc -m` -lt 6 ]
then
continue
fi
echo "$line" | s
On Sun, Nov 29, 2009 at 01:22:15AM +0200, Dotan Cohen wrote:
> > will get the ones that start with capital alphas. if you want initial
> > caps *only* then:
> >
> > grep "^[A-Z][a-z]*$"
> >
> > would match those.
> >
>
> Thanks. I meant that caps could only be at the beginning of a word,
> not in
> will get the ones that start with capital alphas. if you want initial
> caps *only* then:
>
> grep "^[A-Z][a-z]*$"
>
> would match those.
>
Thanks. I meant that caps could only be at the beginning of a word,
not in the middle. Expanding your example, I figured that would be:
grep "^[A-Z]?[a-z]*$
On Sun, Nov 29, 2009 at 12:00:33AM +0200, Dotan Cohen wrote:
> > ISTM that because the output of strings is not discrete list of
> > potential words, but is instead a long list of concatenated
> > characters, this problem is really rather daunting. The output should
> > probably be first broken up
On Saturday 28 November 2009 16:13:55 Dotan Cohen wrote:
> I have a long binary file (about 12 MB) that I need to extract the
> text from via "strings". Naturally, there are a lot of junk lines
> such as these:
> pDuf
> #k0H}g)
> GoV5
> rLeY1
> TMlq,*
>
> Is there a way to grep the output of stri
> ISTM that because the output of strings is not discrete list of
> potential words, but is instead a long list of concatenated
> characters, this problem is really rather daunting. The output should
> probably be first broken up into something resembling words by perhaps
> breaking on non-alphabet
On Sat, Nov 28, 2009 at 11:32:59AM -0600, Boyd Stephen Smith Jr. wrote:
> In <880dece00911280713n6193b8das6970e8a071fc2...@mail.gmail.com>, Dotan Cohen
> wrote:
> >Is there a way to grep the output of strings in order to only show
> >lines that contain words found in the aspell dictionary? Thanks
In <880dece00911280713n6193b8das6970e8a071fc2...@mail.gmail.com>, Dotan Cohen
wrote:
>Is there a way to grep the output of strings in order to only show
>lines that contain words found in the aspell dictionary? Thanks in
>advance.
I once wrote a small program against the aspell API to do somethin
I have a long binary file (about 12 MB) that I need to extract the
text from via "strings". Naturally, there are a lot of junk lines such
as these:
pDuf
#k0H}g)
GoV5
rLeY1
TMlq,*
Is there a way to grep the output of strings in order to only show
lines that contain words found in the aspell diction
14 matches
Mail list logo