Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove 'egrep' and use 'grep -E' instead. #460

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/function/gvm_export_path
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
function gvm_export_path() {
export PATH="$GVM_ROOT/bin:$(echo "$PATH" | $TR_PATH ":" "\n" | "$GREP_PATH" -v '^$' | $EGREP_PATH -v "$GVM_ROOT/(pkgsets|gos|bin)" | $TR_PATH "\n" ":" | $SED_PATH 's/:*$//')"
export PATH="$GVM_ROOT/bin:$(echo "$PATH" | $TR_PATH ":" "\n" | "$GREP_PATH" -v '^$' | $GREP_PATH -E -v "$GVM_ROOT/(pkgsets|gos|bin)" | $TR_PATH "\n" ":" | $SED_PATH 's/:*$//')"
export GVM_PATH_BACKUP="$PATH"
}

2 changes: 0 additions & 2 deletions scripts/function/tools
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ LS_ERROR="GVM couldn't find ls"
TR_ERROR="GVM couldn't find tr"
SED_ERROR="GVM couldn't find sed"
GREP_ERROR="GVM couldn't find grep"
EGREP_ERROR="GVM couldn't find egrep"
SORT_ERROR="GVM couldn't find sort"
HEAD_ERROR="GVM couldn't find head"
HEXDUMP_ERROR="GVM couldn't find hexdump"
Expand All @@ -12,7 +11,6 @@ LS_PATH=$(unalias ls &> /dev/null; command -v ls) || display_error "$LS_ERROR" |
TR_PATH=$(unalias tr &> /dev/null; command -v tr) || display_error "$TR_ERROR" || return 1
SED_PATH=$(unalias sed &> /dev/null; command -v sed) || display_error "$SED_ERROR" || return 1
GREP_PATH=$(unalias grep &> /dev/null; command -v grep) || display_error "$GREP_ERROR" || return 1
EGREP_PATH=$(unalias egrep &> /dev/null; command -v egrep) || display_error "$EGREP_ERROR" || return 1
SORT_PATH=$(unalias sort &> /dev/null; command -v sort) || display_error "$SORT_ERROR" || return 1
HEAD_PATH=$(unalias head &> /dev/null; command -v head) || display_error "$HEAD_ERROR" || return 1
HEXDUMP_PATH=$(unalias hexdump &> /dev/null; command -v hexdump) || display_error "$HEXDUMP_ERROR" || return 1