diff --git a/APP-MANAGER b/APP-MANAGER index ad93b7da2..a327478c2 100755 --- a/APP-MANAGER +++ b/APP-MANAGER @@ -628,7 +628,7 @@ function _clean_launchers() { rm -f "$AMCACHEDIR"/mountpoints for var in "$DATADIR"/applications/AppImages/*.desktop; do # full path to appimage - appimagename=$(grep "^Exec=" 0<"$var" 2>/dev/null | head -1 | cut -c 6- | sed 's/"//g; s/\s.*$//') + appimagename=$(awk -F'=| ' '/Exec=/{print $2; exit}' "$var" | sed 's/"//g; s/\s.*$//') # name of the appimage launcher2del=$(basename -- "$(echo "$appimagename" | tr '[:upper:]' '[:lower:]')") # removable mount point where the appimage may be stored @@ -932,7 +932,7 @@ function _update_launchers() { else echo " ◆ Update local AppImages integrated manually" for var in "$DATADIR"/applications/AppImages/*.desktop; do - appimage_full_path=$(grep "^Exec=" 0<"$var" 2>/dev/null | head -1 | cut -c 6- | sed 's/"//g; s/\s.*$//') + appimage_full_path=$(awk -F'=| ' '/Exec=/{print $2; exit}' "$var" | sed 's/"//g; s/\s.*$//') appimagename=$(basename -- "$appimage_full_path") appimage_path=$(echo "$appimage_full_path" | sed -E 's|/[^/]+$|/|; s/\/*$//g') printf "%b\n File: %b%b\033[0m\n Path: %b" "$DIVIDING_LINE" "${Green}" "$appimagename" "$appimage_path"