Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

grep

grep and escaping a dollar sign

August 9, 2022 by Magenaut

I want to know which files have the string $Id$.

Categories Q&A, Unix & Linux Tags grep, quoting, regular-expression, shell Leave a comment

extract from line to line and then save to separate file

August 9, 2022 by Magenaut

I tried my luck with grep and sed but somehow I don’t manage to get it right.

Categories Q&A, Unix & Linux Tags command-line, grep, sed Leave a comment

How to search for a word in entire content of a directory in linux

August 9, 2022 by Magenaut

need to search for something in entire content

Categories Q&A, Unix & Linux Tags find, grep, linux, shell, xargs Leave a comment

Why doesn’t grep using pipe work here?

August 8, 2022 by Magenaut

I have the following command:

Categories Q&A, Unix & Linux Tags grep, pipe, shell Leave a comment

Match with grep when pattern contains hyphen “-“

August 8, 2022 by Magenaut

I wrote the following command in order to match $a with $b, but when the value includes “-“, then I get an error. How can I avoid that?

Categories Q&A, Unix & Linux Tags grep, special-characters Leave a comment

“Ungrep” – which patterns aren’t matched

August 8, 2022 by Magenaut

I’m looking for a command or script to do the following – given:

Categories Q&A, Unix & Linux Tags grep Leave a comment

Piping search term (not filename) to grep

August 8, 2022 by Magenaut

I want to pick out certain lines containing a given number from a file.
The file I want to search is called os_clusters/piRNA_clusters.bed.

Categories Q&A, Unix & Linux Tags bash, grep, pipe Leave a comment

How to use grep/ack with files in arbitrary encoding?

August 8, 2022 by Magenaut

On my Linux desktop I have a UTF-8 locale. When I try to search some KOI8-R encoded files with grep (ack), it fails. If I manually encode the pattern into KOI8-R and pass that as an argument, it works.

Categories Q&A, Unix & Linux Tags character-encoding, grep, locale Leave a comment

Show lines matching a pattern and the 4 lines before each

August 8, 2022 by Magenaut

For example, from this file:

Categories Q&A, Unix & Linux Tags awk, command-line, grep, hp-ux, sed Leave a comment

Grep word boundaries

August 8, 2022 by Magenaut

Accorging to GNU documentation:

Categories Q&A, Unix & Linux Tags grep, regular-expression Leave a comment
Older posts
Newer posts
← Previous Page1 … Page5 Page6 Page7 … Page10 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress