xshell is going to be super nice for replacing shell scripts with #rust code. Invocation goes like this:
filename = "foo bar";
output = cmd!("file", filename).read().unwrap();
- no shell is actually being run, you don't have to worry about inadvertant expansions (eg. variable or whitespace expansions)
- non-zero exit codes are returned as Result::Err, so you have to handle those
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!