figured out how to check specifically for if grep works

main
The_miro 2025-04-03 11:40:31 +02:00
parent a28a0daffd
commit eea81f0c9c
3 changed files with 7 additions and 9 deletions

12
.zshrc
View File

@ -1,12 +1,6 @@
grep --help >/dev/null 2>&1
RESULT=$?
IsGNU=null
if [ $RESULT -eq 0 ]; then
$IsGNU = true
else
$IsGNU = false
fi
if [ "${IsGNU}}" = "true" ]; then
GREPOUTPUT=$( grep --help 2>&1 )
RESULT=$( echo $GREPOUTPUT | grep gnu )
if [ "${RESULT}" != "" ]; then
#source ~/.bash_profile
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH

Binary file not shown.

View File

@ -40,3 +40,7 @@
2025/03/13 (15:09:25) | ===> btop++ v.1.4.0
2025/03/13 (15:09:25) | WARNING: NVML: Failed to get maximum GPU power draw, defaulting to 225W: Not Supported
2025/03/13 (15:09:25) | WARNING: Intel GPU: Failed to initialize PMU
2025/04/03 (11:17:42) | ===> btop++ v.1.4.0
2025/04/03 (11:17:42) | WARNING: NVML: Failed to get maximum GPU power draw, defaulting to 225W: Not Supported
2025/04/03 (11:17:42) | WARNING: Intel GPU: Failed to initialize PMU