Merge pull request #734 from dheule/fix_zypper_types_echo

readd the use of echo in my explorers
This commit is contained in:
Darko Poljak 2019-02-13 18:14:49 +01:00 committed by GitHub
commit a3a7219ad6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 18 additions and 7 deletions

View File

@ -21,4 +21,5 @@
# Retrieve all repo id nummbers - parsed zypper output
#
#
zypper lr | cut -d'|' -f 1 | grep -E '^[0-9]'
# shellcheck disable=SC2005
echo $(zypper lr | cut -d'|' -f 1 | grep -E '^[0-9]')

View File

@ -23,4 +23,6 @@
#
# simpler command which works only on SLES11 SP3 or newer:
# echo $(zypper lr -E | cut -d'|' -f 1 | grep -E '^[0-9]')
zypper lr | grep -E '^[0-9]([^|]+\|){3,3} Yes' | cut -d'|' -f 1
#
# shellcheck disable=SC2005
echo $(zypper lr | grep -E '^[0-9]([^|]+\|){3,3} Yes' | cut -d'|' -f 1)

View File

@ -26,4 +26,5 @@ if [ -f "$__object/parameter/uri" ]; then
else
uri="$__object_id"
fi
zypper lr -u | grep -F "$uri" | cut -d'|' -f 1 | grep -E '^[0-9]'
# shellcheck disable=SC2005
echo $(zypper lr -u | grep -F "$uri" | cut -d'|' -f 1 | grep -E '^[0-9]')

View File

@ -24,4 +24,6 @@
# simpler command which works only on SLES11 SP3 or newer:
# echo $(zypper lr -u -E | cut -d'|' -f 1 | grep -E '^[0-9]')
# on older systems, zypper doesn't know the parameter -E
zypper lr -u | grep -E '^([^|]+\|){3,3} Yes' | cut -d'|' -f 1 | grep -E '^[0-9]'
#
# shellcheck disable=SC2005
echo $(zypper lr -u | grep -E '^([^|]+\|){3,3} Yes' | cut -d'|' -f 1 | grep -E '^[0-9]')

View File

@ -27,4 +27,6 @@ else
fi
# simpler command which works only on SLES11 SP3 or newer:
# echo $(zypper ls -u -E | grep -E "\<$uri\>" | cut -d'|' -f 1 )
zypper ls -u | grep -E '^([^|]+\|){3,3} Yes' | grep -E "\\<$uri\\>" | cut -d'|' -f 1
#
# shellcheck disable=SC2005
echo $(zypper ls -u | grep -E '^([^|]+\|){3,3} Yes' | grep -E "\\<$uri\\>" | cut -d'|' -f 1)

View File

@ -22,4 +22,6 @@
#
# simpler command which works only on SLES11 SP3 or newer:
# echo $(zypper ls -u -E | cut -d'|' -f 1 | grep -E '^[0-9]')
zypper ls -u | grep -E '^([^|]+\|){3,3} Yes' | cut -d'|' -f 1 | grep -E '^[0-9]'
#
# shellcheck disable=SC2005
echo $(zypper ls -u | grep -E '^([^|]+\|){3,3} Yes' | cut -d'|' -f 1 | grep -E '^[0-9]')

View File

@ -25,4 +25,5 @@ if [ -f "$__object/parameter/uri" ]; then
else
uri="/$__object_id"
fi
zypper ls -u | awk 'BEGIN { FS = "[ ]+\\|[ ]+" } ; $4 == "Yes" && $NF == "'"$uri"'" {print $NF}'
# shellcheck disable=SC2005
echo $(zypper ls -u | awk 'BEGIN { FS = "[ ]+\\|[ ]+" } ; $4 == "Yes" && $NF == "'"$uri"'" {print $NF}')