[test][asan] Replace tr with sed

tr is not available on Windows bot.

GitOrigin-RevId: 9d09982641fa7bb436bf86de33ecb26a8ed63865
diff --git a/test/asan/TestCases/Linux/interface_symbols_linux.cpp b/test/asan/TestCases/Linux/interface_symbols_linux.cpp
index 8723fe0..0f7407c 100644
--- a/test/asan/TestCases/Linux/interface_symbols_linux.cpp
+++ b/test/asan/TestCases/Linux/interface_symbols_linux.cpp
@@ -13,12 +13,12 @@
 // RUN:  | sed -e "s/__asan_version_mismatch_check_v[0-9]+/__asan_version_mismatch_check/" \
 // RUN:  > %t.exports
 //
-// RUN:  cat %t.asan_interface.inc                                                 \
+// RUN:  sed ':a;N;$!ba;s/[\n ]//g;s/)/)\n/g'                                      \
+// RUN:  %t.asan_interface.inc                                                     \
 // RUN:  %p/../../../../lib/ubsan/ubsan_interface.inc                              \
 // RUN:  %p/../../../../lib/sanitizer_common/sanitizer_common_interface.inc        \
 // RUN:  %p/../../../../lib/sanitizer_common/sanitizer_common_interface_posix.inc  \
 // RUN:  %p/../../../../lib/sanitizer_common/sanitizer_coverage_interface.inc      \
-// RUN:  | tr '\n' ' ' | sed "s/ //g" | sed "s/)/)\n/g"                            \
 // RUN:  | grep -e "INTERFACE_\(WEAK_\)\?FUNCTION"                                 \
 // RUN:  | grep -v "__sanitizer_weak_hook"                                         \
 // RUN:  | sed -e "s/.*(//" -e "s/).*//" > %t.imports
diff --git a/test/asan/TestCases/Windows/interface_symbols_windows.cpp b/test/asan/TestCases/Windows/interface_symbols_windows.cpp
index dcf5b1b..5626757 100644
--- a/test/asan/TestCases/Windows/interface_symbols_windows.cpp
+++ b/test/asan/TestCases/Windows/interface_symbols_windows.cpp
@@ -15,21 +15,19 @@
 // [BEWARE: be really careful with the sed commands, as this test can be run
 //  from different environments with different shells and seds]
 //
-// RUN: cat                                                                    \
+// RUN: sed ':a;N;$!ba;s/[\n ]//g;s/)/)\n/g'                                   \
 // RUN:  %p/../../../../lib/asan/asan_interface.inc                            \
 // RUN:  %p/../../../../lib/ubsan/ubsan_interface.inc                          \
 // RUN:  %p/../../../../lib/sanitizer_common/sanitizer_common_interface.inc    \
 // RUN:  %p/../../../../lib/sanitizer_common/sanitizer_coverage_interface.inc  \
-// RUN:  | tr '\n' ' ' | sed "s/ //g" | sed "s/)/)\n/g"                        \
 // RUN:  | grep -e "^INTERFACE_FUNCTION"                                       \
 // RUN:  | sed -e "s/.*(//" -e "s/).*//" > %t.imports1
 //
-// RUN: cat                                                                    \
+// RUN: sed ':a;N;$!ba;s/[\n ]//g;s/)/)\n/g'                                   \
 // RUN:  %p/../../../../lib/asan/asan_interface.inc                            \
 // RUN:  %p/../../../../lib/ubsan/ubsan_interface.inc                          \
 // RUN:  %p/../../../../lib/sanitizer_common/sanitizer_common_interface.inc    \
 // RUN:  %p/../../../../lib/sanitizer_common/sanitizer_coverage_interface.inc  \
-// RUN:  | tr '\n' ' ' | sed "s/ //g" | sed "s/)/)\n/g"                        \
 // RUN:  | grep -e "^INTERFACE_WEAK_FUNCTION"                                  \
 // RUN:  | sed -e "s/.*(//" -e "s/).*/__dll/" > %t.imports2
 //