1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 19:47:45 +00:00

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

This commit is contained in:
Fuad Ismail 2025-01-07 23:13:47 +07:00 committed by Daniel Hofstetter
parent 981019138d
commit a4fdecbf48

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()
}