#echo #utility #gnu #rewrite #version

app gnu-echo-rs

用Rust重写的echo GNU核心实用程序

1 个不稳定版本

0.1.0 2023年7月2日

#23#echo

自定义许可证

13KB
259 代码行

gnu-echo-rs

我用Rust重写的echo GNU核心实用程序

版本: 0.1.0 作者: Lu Baumann

用法

请参阅 gnu-echo-rs --help

Usage: gnu-echo-rs [SHORT-OPTION]... [STRING]...
  or:  gnu-echo-rs LONG-OPTION
Echo the STRING(s) to standard output. Rust rewrite of GNU echo util.

  -n             do not output the trailing newline
  -e             enable interpretation of backslash escapes
  -E             disable interpretation of backslash escapes (default)
      --help     display this help and exit
      --version  output version information and exit

If -e is in effect, the following sequences are recognized:

  \\      backslash
  \a      alert (BEL)
  \b      backspace
  \c      produce no further output
  \e      escape
  \f      form feed
  \n      new line
  \r      carriage return
  \t      horizontal tab
  \v      vertical tab
  \0NNN   byte with octal value NNN (1 to 3 digits)
  \xHH    byte with hexadecimal value HH (1 to 2 digits)

测试

测试脚本需要python >= 3.10

gnu_echo_tests/测试.py-e/bin/echo-b<path/to/gnu-echo-rs>

参数
-e, --echo 测试的echo可执行文件路径
-b, --binary 要测试的gnu-echo-rs二进制文件路径

依赖项

~2.1–3MB
~53K SLoC