projects
/
dotfiles
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
fixed my grep functions
[dotfiles]
/
.bash_filters
1
#!/bin/sh
2
# my weird filters
3
4
5
6
7
containing
() {
8
local
=
$@
;
9
out
=
$
(
echo
$local
|
sed
's/ /|/'
);
10
awk
"/
$out
/"
;
11
}
12
13
not_end_by
() {
14
local
by
=
$1
;
15
# grep -v: inverse match
16
grep
-v
"
$by
$"
17
}
18
19
end_by
() {
20
local
by
=
$1
;
21
grep
"
$by
$"
22
}
23
24
begin_by
() {
25
local
by
=
$1
;
26
grep
"^
$by
"
;
27
}
28
29
not_begin_by
() {
30
local
by
=
$1
;
31
grep
-v
"^
$by
"
;
32
}