Re: simple grep issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ok...

I'm losing my ever lovin' mind...

As a test.. I copied the initial file, did a substitution of dashes
"-" and spaces. Wanted to test to see if the basic grep would then
work...


To my surprise.. it didnt.. I also checked tos see if an alias of grep
was in effect.. nope..

new test file

cat   /cloud_nfs/kk2.dat
WW%WTotalWWWW%WReceivedW%WXferdWWAverageWSpeedWWWTimeWWWWTimeWWWWWTimeWWCurrent
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWDloadWWUploadWWWTotalWWWSpentWWWWLeftWWSpeed
100W48454WW100W48454WWWW0WWWWW0WWW1861WWWWWW0WW0:00:26WW0:00:26WaabaabaaW12177
100W38380WW100W38380WWWW0WWWWW0WW97540WWWWWW0WaabaabaaWaabaabaaWaabaabaaW97540
100W51062WW100W51062WWWW0WWWWW0WWWW99kWWWWWW0WaabaabaaWaabaabaaWaabaabaaW2624k
100W38380WW100W38380WWWW0WWWWW0WWW118kWWWWWW0WaabaabaaWaabaabaaWaabaabaaWW118k
100W48118WW100W48118WWWW0WWWWW0WWW102kWWWWWW0WaabaabaaWaabaabaaWaabaabaaWW102k

grep cmd..
grep  -i 'baaWWWWW0'  /cloud_nfs/kk2.dat
100W48454WW100W48454WWWW0WWWWW0WWW1861WWWWWW0WW0:00:26WW0:00:26WaabaabaaW12177
100W51062WW100W51062WWWW0WWWWW0WWWW99kWWWWWW0WaabaabaaWaabaabaaWaabaabaaW2624k

where W -- was/is the " "
and the "--:--:--" is the "aabaabaa"

I'm sure this is something simple.. but I'm flumoxed.




On Mon, Sep 24, 2018 at 3:45 PM, bruce <badouglas@xxxxxxxxx> wrote:
> On Mon, Sep 24, 2018 at 3:03 PM, Michael D. Setzer II
> <msetzerii@xxxxxxxxx> wrote:
>> I copy the text you have, and my grep line doesn't return those two lines
>> since they don't contain the string ":--    0"  in them?
>>
>> which grep are you using?
>> which grep returns path?
>> grep --help returns version number?
>>
>
>
>>>>>>>>>>>>>>>>>>>>>>
>
> Hi Michael,
>
> the grpe/version
>
> grep -V
> grep (GNU grep) 2.20
> Copyright (C) 2014 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
>
>
>
>>>>>>>>>>>>>>>>>>>>>>
>
>
>> Not sure why it seems to be returning lines that don't contain the string that it
>> is suppose to match.
>>
>>
>> On 24 Sep 2018 at 14:36, bruce wrote:
>>
>> From:                   bruce <badouglas@xxxxxxxxx>
>> Date sent:              Mon, 24 Sep 2018 14:36:09 -0400
>> Subject:                Re: simple grep issue
>> To:                     "Michael D. Setzer II" <msetzerii@xxxxxxxxx>
>>
>>> sorry...
>>>
>>> the issue is that the grep i posted returns a match of a couple of
>>> strings.. i'm looking to treturn 0/none..
>>>
>>>
>>>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>>>                                  Dload  Upload   Total   Spent    Left  Speed
>>> 100 48454  100 48454    0     0   1861      0  0:00:26  0:00:26 --:--:-- 12177
>>> 100 38380  100 38380    0     0  97540      0 --:--:-- --:--:-- --:--:-- 97540
>>> 100 51062  100 51062    0     0    99k      0 --:--:-- --:--:-- --:--:-- 2624k
>>> 100 38380  100 38380    0     0   118k      0 --:--:-- --:--:-- --:--:--  118k
>>> 100 48118  100 48118    0     0   102k      0 --:--:-- --:--:-- --:--:--  102k
>>>
>>>  grep -e  ":--     0"  /cloud_nfs/kk1.dat
>>> 100 48454  100 48454    0     0   1861      0  0:00:26  0:00:26 --:--:-- 12177
>>> 100 51062  100 51062    0     0    99k      0 --:--:-- --:--:-- --:--:-- 2624k
>>>
>>>
>>>
>>> On Mon, Sep 24, 2018 at 2:33 PM, Michael D. Setzer II
>>> <msetzerii@xxxxxxxxx> wrote:
>>> > The file doesn't have any :--- in it? So, what are you trying to match?
>>> > All the : are followed by only two - not 3?
>>> > Then none have 3 spaced and a zero.
>>> >
>>> >
>>> > On 24 Sep 2018 at 13:56, bruce wrote:
>>> >
>>> > From:                   bruce <badouglas@xxxxxxxxx>
>>> > Date sent:              Mon, 24 Sep 2018 13:56:27 -0400
>>> > Subject:                simple grep issue
>>> > To:                     Community support for Fedora users
>>> > <users@xxxxxxxxxxxxxxxxxxxxxxx>
>>> > Send reply to:          Community support for Fedora users
>>> > <users@xxxxxxxxxxxxxxxxxxxxxxx>
>>> >
>>> >> simple test file
>>> >> cat  gg.dat
>>> >>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>>> >>                                  Dload  Upload   Total   Spent    Left  Speed
>>> >> 100 42437  100 42437    0     0    590      0  0:01:11  0:01:11 --:--:--  8789
>>> >> 100 41664  100 41664    0     0   140k      0 --:--:-- --:--:-- --:--:-- 2034k
>>> >> 100 34574  100 34574    0     0   133k      0 --:--:-- --:--:-- --:--:--  133k
>>> >> 100 42430  100 42430    0     0   179k      0 --:--:-- --:--:-- --:--:--  179k
>>> >> 100 42428  100 42428    0     0   207k      0 --:--:-- --:--:-- --:--:--  207k
>>> >>
>>> >> I simply want to test/check for the actual string --->>>:---     0<<<
>>> >>
>>> >> I've tested a number of different grep permutations.. missing something..
>>> >>
>>> >> grep -i ":---     0" gg.dat
>>> >> doesn't work...
>>> >>
>>> >> I'm not looking to match regex but find the actual string.
>>> >>
>>> >> thoughts/comments
>>> >>
>>> >> thanks
>>> >> _______________________________________________
>>> >> users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
>>> >> To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
>>> >> Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
>>> >> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
>>> >> List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
>>> >
>>> >
>>> > +------------------------------------------------------------+
>>> >  Michael D. Setzer II - Computer Science Instructor (Retired)
>>> >  mailto:mikes@xxxxxxxx
>>> >  mailto:msetzerii@xxxxxxxxx
>>> >  Guam - Where America's Day Begins
>>> >  G4L Disk Imaging Project maintainer
>>> >  http://sourceforge.net/projects/g4l/
>>> > +------------------------------------------------------------+
>>> >
>>> > http://setiathome.berkeley.edu (Original)
>>> > Number of Seti Units Returned:  19,471
>>> > Processing time:  32 years, 290 days, 12 hours, 58 minutes
>>> > (Total Hours: 287,489)
>>> >
>>> > BOINC@HOME CREDITS
>>> >
>>> > ROSETTA      65857826.080195 | ABC          16613838.513356
>>> > SETI        109554082.635528 | EINSTEIN    141443706.499240
>>> >
>>
>>
>> +------------------------------------------------------------+
>>  Michael D. Setzer II - Computer Science Instructor (Retired)
>>  mailto:mikes@xxxxxxxx
>>  mailto:msetzerii@xxxxxxxxx
>>  Guam - Where America's Day Begins
>>  G4L Disk Imaging Project maintainer
>>  http://sourceforge.net/projects/g4l/
>> +------------------------------------------------------------+
>>
>> http://setiathome.berkeley.edu (Original)
>> Number of Seti Units Returned:  19,471
>> Processing time:  32 years, 290 days, 12 hours, 58 minutes
>> (Total Hours: 287,489)
>>
>> BOINC@HOME CREDITS
>>
>> ROSETTA      65857826.080195 | ABC          16613838.513356
>> SETI        109554082.635528 | EINSTEIN    141443706.499240
>>
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux