Skip to content
a alternative for $grep -f A.list B.file which cost too many memory
Crystal
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib/admiral
.gitattributes
README.md
coreuniq.between.two.file
coreuniq.between.two.file.cr
crystal.binary.wrap.sh
git.rm.sh
git.sh
grepfile
grepfile.cr
grepfile.wrap.x86-64
myth.coreid.list
myth.diff.stat.txt
myth.q.column1.uniqid.list
myth.t.column1.uniqid.list
q.list
t.list

README.md

grepfile

usage:

$ cat t.list
@ddd
>B1
A1

$ cat q.list
#xx
>A1
>ddd
A2
>B

$ ./grepfile t.list  q.list  # by default: --ignore-line-mathed-by  "^[#@]" --delete-chars-from-column "^>"
A1


$ ldd grepfile
	not a dynamic executable
Contact: ilikeorangeapple@gmail.com or go to https://github.com/orangeSi/grepfile/issues
Usage:
  grepfile [flags...] <target> <query> [arg...]

A replace for grep -f(which cost too many memory)

Flags:
  --column-query (default: 1)
  --column-target (default: 1)
  --delete-chars-from-column (default: "^>")  # delete id first chars, support regex syntax
  --help                                      # Displays help for the current command.
  --ignore-line-mathed-by (default: "^[#@]")  # if id start with # or @, will remove # or @, support regex syntax
  --invert-match (default: 0)                 # Invert the sense of matching, to select non-matching lines
  --sep-query (default: "\t")                 # query separator, '\t' or '\s'
  --sep-target (default: "\t")                # target separator, '\t' or '\s'
  --version                                   # Displays the version of the current application.

Arguments:
  target (required)                           # target file
  query (required)                            # query file

You can’t perform that action at this time.