#shell #string-parser #bash #sh

shellwords

Manipulate strings according to the word parsing rules of the UNIX Bourne shell

3 releases (stable)

1.1.0 Jun 27, 2020
1.0.0 Sep 27, 2018
0.1.0 Sep 3, 2017

#199 in Command-line interface

Download history 28508/week @ 2024-09-16 28992/week @ 2024-09-23 21346/week @ 2024-09-30 24850/week @ 2024-10-07 34618/week @ 2024-10-14 23712/week @ 2024-10-21 48306/week @ 2024-10-28 19891/week @ 2024-11-04 29991/week @ 2024-11-11 26763/week @ 2024-11-18 52711/week @ 2024-11-25 31932/week @ 2024-12-02 28278/week @ 2024-12-09 31799/week @ 2024-12-16 29752/week @ 2024-12-23 28864/week @ 2024-12-30

120,637 downloads per month
Used in 55 crates (37 directly)

MIT license

10KB
142 lines

shellwords

Crate shellwords provides utilities for parsing strings as they would be interpreted by the UNIX Bourne shell.

Examples

Split a string into a vector of words in the same way the UNIX Bourne shell does:

assert_eq!(split("here are \"two words\"").unwrap(), ["here", "are", "two words"]);

shellwords is released under the MIT license. See LICENSE for details.


lib.rs:

Crate shellwords provides utilities for parsing strings as they would be interpreted by the UNIX Bourne shell.

Dependencies

~2.2–3MB
~55K SLoC