On 08/17/18 15:17, Todd Chester wrote:
> Hi All,
>
> grep and sed stopped working!  I dnf re-installed them
> both. No joy
>
> What the heck (not my "actual" word)?
>
>
> <editorial comment>  AAAAAAAAHHHHHHHHH!!!!!!!! </editorial comment>
>
> How do I fix this?
>
> Many thanks,
> -T
>
>
> uname -r
> 4.17.9-200.fc28.x86_64
>
> # rpm -qa grep
> grep-3.1-5.fc28.x86_64
>
> # rpm -qa sed
> sed-4.5-1.fc28.x86_64
>
>
>
> $ echo "a-b-c" | sed -e 's/-//g'
> <nothing>
>
> Workaround:
>     $ echo "a-b-c" | perl -pe 's/-//g'
>     abc
>
>     $ echo "a-b-c" | perl6 -pe 's:g/\-//'
>     abc
>
>
>
> $ ls -al /tmp | sed -n 3,4p
> <nothing>
>
> Workaround:
>     $  ls -al /tmp  | perl6 -ne ".say if 3 <= ++$ <= 4"
>     dr-xr-xr-x. 19 root root    278 Apr 11 20:43 ..
>     drwxr--r--.  2 todd users    40 Aug 17 00:08 ARI
>
>     $ x=3; y=4; ls -al /tmp  | perl6 -ne ".say if $x <= ++$ <= $y"
>     dr-xr-xr-x. 19 root root    278 Apr 11 20:43 ..
>     drwxr--r--.  2 todd users    40 Aug 17 00:08 ARI
>
>
>
> # echo "abc" | grep  "ab"
> <nothing>
>
> Work around:
>     $ echo "abc" | ack "ab"
>     abc

Interesting.  Something strange in your environment?

[egreshko@meimei ~]$ uname -r
4.17.14-202.fc28.x86_64

[egreshko@meimei ~]$ rpm -q grep
grep-3.1-5.fc28.x86_64

[egreshko@meimei ~]$ rpm -q sed
sed-4.5-1.fc28.x86_64

[egreshko@meimei ~]$ echo "a-b-c" | sed -e 's/-//g'
abc

[egreshko@meimei ~]$ ls -al /tmp | sed -n 3,4p
dr-xr-xr-x. 23 root     root      4096 May  6 07:54 ..
-rw-------.  1 egreshko egreshko 16757 Aug 16 22:52 .com.google.Chrome.cQiCz9

[egreshko@meimei ~]$ echo "abc" | grep  "ab"
abc

-- 
Conjecture is just a conclusion based on incomplete information. It isn't a 
fact.

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
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@lists.fedoraproject.org/message/YIQCGYFNUUSJ25HADJNWVJFHKN7WYFAU/

Reply via email to