grep output extraneous lines ... Any ideas how / why ?
by babydr from LinuxQuestions.org on (#6P10P)
Code:$ uname -a
Linux replaceme.baby-dragons.com 5.15.161 #1 SMP PREEMPT Sun Jun 16 15:55:06 CDT 2024 x86_64 Intel(R) Xeon(R) CPU E5-2687W 0 @ 3.10GHz GenuineIntel GNU/Linux
$ cat /etc/slackware-version
Slackware 15.0Code:$ grep '6\.9' cron-rsync-mirror-Slackware-current-*
7,269,016 100% 400.04kB/s 0:00:17 (xfr#47, to-chk=13407/16000)
833 100% 6.95kB/s 0:00:00 (xfr#92, to-chk=8374/16000)
10,554,956 100% 401.57kB/s 0:00:25 (xfr#14, to-chk=14640/15999)
35,042,116 100% 398.47kB/s 0:01:25 (xfr#35, to-chk=10913/15999)
40,981,801 100% 398.24kB/s 0:01:40 (xfr#51, to-chk=4390/15998)And even more weird ...
Code:$ grep -L '6\.9' cron-rsync-mirror-Slackware-current-*
cron-rsync-mirror-Slackware-current-20240701114613.log
cron-rsync-mirror-Slackware-current-20240705114612.log
$ grep '6\.9' cron-rsync-mirror-Slackware-current-20240701114613.log
$ grep '6\.9' cron-rsync-mirror-Slackware-current-20240705114612.log
$Code:$ alias | grep grep
alias boo='w | grep '\''[[:space:]]w$'\'''
$ declare | grep grep
[ -z "${B}" ] && /usr/bin/df -a -x cgroup --output | /bin/egrep "^(/dev/|Files)";
[ ! -z "${B}" ] && /usr/bin/df -a -x cgroup --output "${B}" | /bin/egrep "^(/dev/|Files)"
Linux replaceme.baby-dragons.com 5.15.161 #1 SMP PREEMPT Sun Jun 16 15:55:06 CDT 2024 x86_64 Intel(R) Xeon(R) CPU E5-2687W 0 @ 3.10GHz GenuineIntel GNU/Linux
$ cat /etc/slackware-version
Slackware 15.0Code:$ grep '6\.9' cron-rsync-mirror-Slackware-current-*
7,269,016 100% 400.04kB/s 0:00:17 (xfr#47, to-chk=13407/16000)
833 100% 6.95kB/s 0:00:00 (xfr#92, to-chk=8374/16000)
10,554,956 100% 401.57kB/s 0:00:25 (xfr#14, to-chk=14640/15999)
35,042,116 100% 398.47kB/s 0:01:25 (xfr#35, to-chk=10913/15999)
40,981,801 100% 398.24kB/s 0:01:40 (xfr#51, to-chk=4390/15998)And even more weird ...
Code:$ grep -L '6\.9' cron-rsync-mirror-Slackware-current-*
cron-rsync-mirror-Slackware-current-20240701114613.log
cron-rsync-mirror-Slackware-current-20240705114612.log
$ grep '6\.9' cron-rsync-mirror-Slackware-current-20240701114613.log
$ grep '6\.9' cron-rsync-mirror-Slackware-current-20240705114612.log
$Code:$ alias | grep grep
alias boo='w | grep '\''[[:space:]]w$'\'''
$ declare | grep grep
[ -z "${B}" ] && /usr/bin/df -a -x cgroup --output | /bin/egrep "^(/dev/|Files)";
[ ! -z "${B}" ] && /usr/bin/df -a -x cgroup --output "${B}" | /bin/egrep "^(/dev/|Files)"