Skip to content

Commit

Permalink
Add support for -bnx 'regex'
Browse files Browse the repository at this point in the history
  • Loading branch information
VR-25 committed Jun 24, 2022
1 parent b1d3484 commit e667f34
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tarb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,22 @@ app_r() {


backup() {
local one=
local regex=
local x=v
if flag c; then
shift
cust $*
else
lspkg "$@" > $_LINES
if flag n; then
one=$1
shift
regex="$(echo "$@" | sed 's/,/|/g')"
flag x && regex="${regex:-^//$}" || { x=; regex="${regex:-.}"; }
lspkg $one | grep -E$x "$regex" > $_LINES
else
lspkg "$@" > $_LINES
fi
bkp
fi
}
Expand Down

0 comments on commit e667f34

Please sign in to comment.