Skip to content

Commit

Permalink
Add a third backslash
Browse files Browse the repository at this point in the history
  • Loading branch information
Haroon-Khel committed Oct 1, 2024
1 parent 79bb276 commit f19245d
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 f19245d

Please sign in to comment.