tests/csplit: use printf instead of echo -n for maximum portability with all UNIX systems

This commit is contained in:
Fuad Ismail
2025-01-09 10:52:19 +01:00
committed by Daniel Hofstetter
parent 981019138d
commit a4fdecbf48
+1 -1
View File
@@ -1445,7 +1445,7 @@ fn create_named_pipe_with_writer(path: &str, data: &str) -> std::process::Child
nix::unistd::mkfifo(path, nix::sys::stat::Mode::S_IRWXU).unwrap();
std::process::Command::new("sh")
.arg("-c")
.arg(format!("echo -n '{}' > {path}", data))
.arg(format!("printf '{}' > {path}", data))
.spawn()
.unwrap()
}