Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
eepm
Commits
d5d079f2
Commit
d5d079f2
authored
Apr 22, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools_json: replace egrep with grep -E
parent
ba7a55a9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
tools_json
bin/tools_json
+5
-5
No files found.
bin/tools_json
View file @
d5d079f2
...
...
@@ -77,14 +77,14 @@ tokenize () {
local
ESCAPE
local
CHAR
if
echo
"test string"
|
egrep
-ao
--color
=
never
"test"
>
/dev/null 2>&1
if
echo
"test string"
|
grep
-E
-ao
--color
=
never
"test"
>
/dev/null 2>&1
then
GREP
=
'
egrep
-ao --color=never'
GREP
=
'
grep -E
-ao --color=never'
else
GREP
=
'
egrep
-ao'
GREP
=
'
grep -E
-ao'
fi
if
echo
"test string"
|
egrep
-o
"test"
>
/dev/null 2>&1
if
echo
"test string"
|
grep
-E
-o
"test"
>
/dev/null 2>&1
then
ESCAPE
=
'(\\[^u[:cntrl:]]|\\u[0-9a-fA-F]{4})'
CHAR
=
'[^[:cntrl:]"\\]'
...
...
@@ -102,7 +102,7 @@ tokenize () {
# Force zsh to expand $A into multiple words
local
is_wordsplit_disabled
=
$(
unsetopt 2>/dev/null |
grep
-c
'^shwordsplit$'
)
if
[
$is_wordsplit_disabled
!=
0
]
;
then
setopt shwordsplit
;
fi
$GREP
"
$STRING
|
$NUMBER
|
$KEYWORD
|
$SPACE
|."
|
egrep
-v
"^
$SPACE
$"
$GREP
"
$STRING
|
$NUMBER
|
$KEYWORD
|
$SPACE
|."
|
grep
-E
-v
"^
$SPACE
$"
if
[
$is_wordsplit_disabled
!=
0
]
;
then
unsetopt shwordsplit
;
fi
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment