Skip to content

Commit a3f5e3b

Browse files
authored
Merge pull request #246 from mechanicalamit/egrep_to_grep_E
Change occurrences of egrep to grep -E
2 parents 15f9a49 + e19b185 commit a3f5e3b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.ci/check-format.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
SOURCES=$(find $(git rev-parse --show-toplevel) | egrep "\.(cpp|cc|c|h)\$")
3+
SOURCES=$(find $(git rev-parse --show-toplevel) | grep -E "\.(cpp|cc|c|h)\$")
44

55
CLANG_FORMAT=$(which clang-format-12)
66
if [ $? -ne 0 ]; then
@@ -18,4 +18,4 @@ do
1818
$CLANG_FORMAT ${file} > expected-format
1919
diff -u -p --label="${file}" --label="expected coding style" ${file} expected-format
2020
done
21-
exit $($CLANG_FORMAT --output-replacements-xml ${SOURCES} | egrep -c "</replacement>")
21+
exit $($CLANG_FORMAT --output-replacements-xml ${SOURCES} | grep -E -c "</replacement>")

.ci/static-analysis.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
function do_cppcheck()
44
{
5-
local SOURCES=$(find $(git rev-parse --show-toplevel) | egrep "\.(cpp|cc|c|h)\$")
5+
local SOURCES=$(find $(git rev-parse --show-toplevel) | grep -E "\.(cpp|cc|c|h)\$")
66

77
local CPPCHECK=$(which cppcheck)
88
if [ $? -ne 0 ]; then
@@ -25,7 +25,7 @@ function do_cppcheck()
2525
--std=c89 "
2626

2727
$CPPCHECK $OPTS --xml ${SOURCES} 2> cppcheck.xml
28-
local ERROR_COUNT=$(cat cppcheck.xml | egrep -c "</error>" )
28+
local ERROR_COUNT=$(cat cppcheck.xml | grep -E -c "</error>" )
2929

3030
if [ $ERROR_COUNT -gt 0 ]; then
3131
echo "Cppcheck failed: $ERROR_COUNT error(s)"
@@ -49,8 +49,8 @@ function do_sparse()
4949

5050
make -C examples C=2 CHECK="$SPARSE" 2> sparse.log
5151

52-
local WARNING_COUNT=$(cat sparse.log | egrep -c " warning:" )
53-
local ERROR_COUNT=$(cat sparse.log | egrep -c " error:" )
52+
local WARNING_COUNT=$(cat sparse.log | grep -E -c " warning:" )
53+
local ERROR_COUNT=$(cat sparse.log | grep -E -c " error:" )
5454
local COUNT=`expr $WARNING_COUNT + $ERROR_COUNT`
5555
if [ $COUNT -gt 0 ]; then
5656
echo "Sparse failed: $WARNING_COUNT warning(s), $ERROR_COUNT error(s)"
@@ -70,8 +70,8 @@ function do_gcc()
7070

7171
make -C examples CONFIG_STATUS_CHECK_GCC=y STATUS_CHECK_GCC=$GCC 2> gcc.log
7272

73-
local WARNING_COUNT=$(cat gcc.log | egrep -c " warning:" )
74-
local ERROR_COUNT=$(cat gcc.log | egrep -c " error:" )
73+
local WARNING_COUNT=$(cat gcc.log | grep -E -c " warning:" )
74+
local ERROR_COUNT=$(cat gcc.log | grep -E -c " error:" )
7575
local COUNT=`expr $WARNING_COUNT + $ERROR_COUNT`
7676
if [ $COUNT -gt 0 ]; then
7777
echo "gcc failed: $WARNING_COUNT warning(s), $ERROR_COUNT error(s)"

0 commit comments

Comments
 (0)