mkdir -p $(DESTDIR)$(SA_LIB_DIR)
mkdir -p $(DESTDIR)$(SA_DIR)
ifeq ($(CLEAN_SA_DIR),y)
- find $(DESTDIR)$(SA_DIR) -type f | egrep "/sar?[0-9]{2,8}(\.(Z|gz|bz2|xz|lz|lzo))?$$" | xargs rm -f
- find $(DESTDIR)$(SA_DIR) -type f | egrep "/sar?[0-9]{2,8}$$" | xargs rm -f
+ find $(DESTDIR)$(SA_DIR) -type f | grep -E "/sar?[0-9]{2,8}(\.(Z|gz|bz2|xz|lz|lzo))?$$" | xargs rm -f
+ find $(DESTDIR)$(SA_DIR) -type f | grep -E "/sar?[0-9]{2,8}$$" | xargs rm -f
endif
mkdir -p $(DESTDIR)$(BIN_DIR)
mkdir -p $(DESTDIR)$(DOC_DIR)
TESTDIR="tests"
TESTRUN="/bin/sh"
-TESTLIST:=$(shell ls $(TESTDIR) | egrep '^[0-9]+$$' | sort -n)
+TESTLIST:=$(shell ls $(TESTDIR) | grep -E '^[0-9]+$$' | sort -n)
EXTRADIR="tests/extra"
-EXTRALIST:=$(shell ls $(EXTRADIR) | egrep '^[0-9]+$$' | sort -n)
+EXTRALIST:=$(shell ls $(EXTRADIR) | grep -E '^[0-9]+$$' | sort -n)
testcomp: tests/ini/inisar sa32bit
SA_FILES=`$FIND "$SA_DIR" -type f -printf '%T@,%p\n' \
- | egrep "$SA_REGEX" | $SORT -n -r | $CUT -d, -f2`
+ | grep -E "$SA_REGEX" | $SORT -n -r | $CUT -d, -f2`
# Main loop
cpu_gnuplot() # %iowait,%user,%nice,%system,%steal
{
# First make sure that the columns are where we expect them to be
- HEADER=`egrep -v ';LINUX-RESTART|;COM' $2 | head -1 | cut -d ';' -f 5-10`
+ HEADER=`grep -Ev ';LINUX-RESTART|;COM' $2 | head -1 | cut -d ';' -f 5-10`
EXPECTED="%user;%nice;%system;%iowait;%steal;%idle"
if [ "$HEADER" != "$EXPECTED" ]
then
mem_gnuplot() # free,used,buffers,cached / %commit,%swpused
{
# First make sure that the columns are where we expect them to be
- HEADER=`egrep -v ';LINUX-RESTART|;COM' $2 | head -1 | cut -d ';' -f 4-10`
+ HEADER=`grep -Ev ';LINUX-RESTART|;COM' $2 | head -1 | cut -d ';' -f 4-10`
EXPECTED="kbmemfree;kbmemused;%memused;kbbuffers;kbcached;kbcommit;%commit"
if [ "$HEADER" != "$EXPECTED" ]
then
echo "Headers not in right order: $HEADER" 1>&2
exit 1
fi
- HEADER=`egrep -v ';LINUX-RESTART|;COM' $3 | head -1 | cut -d ';' -f 4-6`
+ HEADER=`grep -Ev ';LINUX-RESTART|;COM' $3 | head -1 | cut -d ';' -f 4-6`
EXPECTED="kbswpfree;kbswpused;%swpused"
if [ "$HEADER" != "$EXPECTED" ]
then
io_gnuplot() # %KBr/s,KBw/s / rIOPS,wIOPS
{
# First make sure that the columns are where we expect them to be
- HEADER=`egrep -v ';LINUX-RESTART|;COM' $2 | head -1 | cut -d ';' -f 4-8`
+ HEADER=`grep -Ev ';LINUX-RESTART|;COM' $2 | head -1 | cut -d ';' -f 4-8`
EXPECTED="tps;rtps;wtps;bread/s;bwrtn/s"
if [ "$HEADER" != "$EXPECTED" ]
then
SAFILES_REGEX='/sar?[0-9]{2,8}(\.(Z|gz|bz2|xz|lz|lzo))?$'
find "${SA_DIR}" -type f -mtime +${HISTORY} \
- | egrep "${SAFILES_REGEX}" \
+ | grep -E "${SAFILES_REGEX}" \
| xargs rm -f
UNCOMPRESSED_SAFILES_REGEX='/sar?[0-9]{2,8}$'
find "${SA_DIR}" -type f -mtime +${COMPRESSAFTER} \
- | egrep "${UNCOMPRESSED_SAFILES_REGEX}" \
+ | grep -E "${UNCOMPRESSED_SAFILES_REGEX}" \
| xargs -r "${ZIP}" > /dev/null
exit 0