tim-rust-minigrep

Crates.iotim-rust-minigrep
lib.rstim-rust-minigrep
version0.1.1
sourcesrc
created_at2023-06-13 02:21:45.849372
updated_at2023-06-13 02:45:46.727799
descriptionA Minigrep
homepage
repository
max_upload_size
id888608
size6,054
TimZhang (TimZhang2090)

documentation

README

$ cargo run -- 被搜索关键字 example-filename.txt
$ cargo run -- to poem.txt

携带环境变量

IGNORE_CASE=1 cargo run -- to poem.txt

如果你使用 PowerShell,则需要用两个命令来分别设置环境变量并运行程序:

PS> $Env:IGNORE_CASE=1; cargo run to poem.txt

on Windows:

set RUST_BACKTRACE=1
tauri dev

只有标准输出会输出到 output.txt 文件; 标准错误输出(eprintln!),则不会。

cargo run > output.txt
Commit count: 0

cargo fmt