Call and spawn new process with stdin
Ziggit
Call and spawn new process with stdin
I want to call a process and provide stdin and get stdout how to do that? The pipe gives and takes a file and I do not know how to read it or create one from just hard coded string, this is somewhat pseudo code, any ideas how to make it work: const std = @import("std"); pub fn main(init: std.process.Init) !void { const io = init.io; const input = "Hello from zig"; var child = try std.process.spawn( io, .{ .argv = &[_][]const u8{"/bin/cat"}, .stdin...
0 comments
No comments yet.