Skip to content

Commit

Permalink
Add a third backslash (#3965)
Browse files Browse the repository at this point in the history
  • Loading branch information
Haroon-Khel authored Oct 2, 2024
1 parent f0d69eb commit 0cbfe45
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tooling/strace_analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -258,17 +258,17 @@ processFiles() {
case "${os_type}" in
"alpine")
# Process alpine package query output: "FILE is owned by PACKAGE"
pkg_name="$(echo "$pkg" | sed 's/is owned by//g' | tr -s ' ' | cut -d' ' -f2 | tr -d '\\n\\r')"
pkg_name="$(echo "$pkg" | sed 's/is owned by//g' | tr -s ' ' | cut -d' ' -f2 | tr -d '\\\n\\\r')"
pkg_version="$pkg_name"
;;
"debian")
# Process debian package query output: "PACKAGE: FILE"
pkg_name="$(echo "$pkg" | cut -d":" -f1 | tr -d '\\n\\r')"
pkg_version="$(apt show "$pkg_name" 2>/dev/null | grep Version | cut -d" " -f2 | tr -d '\\n\\r')"
pkg_name="$(echo "$pkg" | cut -d":" -f1 | tr -d '\\\n\\\r')"
pkg_version="$(apt show "$pkg_name" 2>/dev/null | grep Version | cut -d" " -f2 | tr -d '\\\n\\\r')"
;;
"centos")
# Process centos package query output: "PACKAGE"
pkg_name="$(echo "$pkg" | cut -d" " -f1 | tr -d '\\n\\r')"
pkg_name="$(echo "$pkg" | cut -d" " -f1 | tr -d '\\\n\\\r')"
pkg_version="$pkg_name"
;;
*)
Expand Down

0 comments on commit 0cbfe45

Please sign in to comment.