git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] t9401: Use tr to handle TAB

From
Torsten Bögershausen <tboegi@web.de>
Date
Oct 25, 2012, 13:06 UTC
Message-ID
<201210251506.32393.tboegi@web.de>

Not all sed versions understand \s as whitespace Use tr to translate '\t' into ' ' before feeding the line into sed

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
---
 t/t9401-git-cvsserver-crlf.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t9401-git-cvsserver-crlf.sh b/t/t9401-git-cvsserver-crlf.sh
index cdb8360..f2ec9d2 100755
--- a/t/t9401-git-cvsserver-crlf.sh
+++ b/t/t9401-git-cvsserver-crlf.sh
@@ -46,7 +46,7 @@ check_status_options() {
 	echo "Error from cvs status: $1 $2" >> "${WORKDIR}/marked.log"
 	return 1;
     fi
-    got="$(sed -n -e 's/^\s*Sticky Options:\s*//p' "${WORKDIR}/status.out")"
+    got="$(tr '\t' ' ' < "${WORKDIR}/status.out" | sed -n -e 's/^ *Sticky Options: *//p')"
     expect="$3"
     if [ x"$expect" = x"" ] ; then
 	expect="(none)"
-- 
1.7.12
Message 1 of 1 in “t9401: Use tr to handle TAB”
  1. t9401: Use tr to handle TABTorsten Bögershausen, Oct 25, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.