rust_cmd_lib VS scripts

Compare rust_cmd_lib vs scripts and see what are their differences.

rust_cmd_lib

Common rust command-line macros and utilities, to write shell-script like tasks in a clean, natural and rusty way (by rust-shell-script)

scripts

Useful scripts that I find handy to work with (by alblue)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
rust_cmd_lib scripts
11 2
988 3
- -
8.0 0.0
5 months ago about 2 years ago
Rust Shell
Apache License 2.0 MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

rust_cmd_lib

Posts with mentions or reviews of rust_cmd_lib. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-10-25.
  • Was Rust Worth It?
    18 projects | news.ycombinator.com | 25 Oct 2023
  • Execute $(command) in std::process::Command?
    1 project | /r/rust | 25 Jul 2021
    With rust_cmd_lib, you can write below code without launching shell:
  • How to do things safely in Bash
    9 projects | news.ycombinator.com | 3 Apr 2021
    zsh is also doing the variable substitution better than bash. FYI, I just released rust_cmd_lib 1.0 recently, which can do variable substitution without any quotes: https://github.com/rust-shell-script/rust_cmd_lib
  • cmd_lib: v1.0 released!
    1 project | /r/rust | 29 Mar 2021
  • Process file in parallel
    1 project | /r/rust | 26 Mar 2021
    With cmd_lib and rayon, it could be done in below one line code:
  • Using rust cmd_lib to replace your bash scripts!
    2 projects | /r/bash | 19 Mar 2021
    #!/usr/bin/env ngs # In response to https://github.com/rust-shell-script/rust_cmd_lib/blob/1f2fc2303db3f467c42589bd944b31834c8a0bca/examples/dd_test.rs # $ ./dd_test.ngs --file /dev/nvme0n1 --block_size 4096 --threads_count 4 # [LOG 2021-03-20 10:57:14 IST] Dropping caches at first # [LOG 2021-03-20 10:57:14 IST] Running command: sudo bash -c echo\ 3\ \>\ /proc/sys/vm/drop_caches # [LOG 2021-03-20 10:57:15 IST] Running with threads: 4, block size: 4096 # [LOG 2021-03-20 10:57:15 IST] Running command: sudo bash -c dd\ if=/dev/nvme0n1\ of=/dev/null\ bs=4096\ skip=1310720\ count=655360\ 2\>\&1 # [LOG 2021-03-20 10:57:15 IST] Running command: sudo bash -c dd\ if=/dev/nvme0n1\ of=/dev/null\ bs=4096\ skip=655360\ count=655360\ 2\>\&1 # [LOG 2021-03-20 10:57:15 IST] Running command: sudo bash -c dd\ if=/dev/nvme0n1\ of=/dev/null\ bs=4096\ skip=1966080\ count=655360\ 2\>\&1 # [LOG 2021-03-20 10:57:15 IST] Running command: sudo bash -c dd\ if=/dev/nvme0n1\ of=/dev/null\ bs=4096\ skip=0\ count=655360\ 2\>\&1 # [LOG 2021-03-20 10:57:22 IST] thread 0 bandwidth: 450 MB/s # [LOG 2021-03-20 10:57:22 IST] thread 1 bandwidth: 451 MB/s # [LOG 2021-03-20 10:57:22 IST] thread 2 bandwidth: 453 MB/s # [LOG 2021-03-20 10:57:22 IST] thread 3 bandwidth: 451 MB/s # [LOG 2021-03-20 10:57:22 IST] Total bandwidth: 1805 MB/s # Command line arguments automatically fed into main() # Default data size - 10G F main(file:Str, block_size:Int=4096, threads_count:Int=1, data_size:Int=10 * 1024 * 1024 * 1024) { log("Dropping caches at first") $(log: sudo bash -c "echo 3 > /proc/sys/vm/drop_caches") log("Running with threads: ${threads_count}, block size: ${block_size}") # Parallel map: each callback runs in it's own thread cnt = data_size / threads_count / block_size results = threads_count.pmap(F(i) { off = cnt * i `log: sudo bash -c "dd if=$file of=/dev/null bs=$block_size skip=$off count=$cnt 2>&1"` }) total_bandwidth = 0 results.each_idx_val(F(i, output) { # "line:" makes the first line of output as the result of `...` bandwidth = `echo $output | line: awk '/MB/ {print $10}'`.Int() log("thread ${i} bandwidth: ${bandwidth} MB/s") total_bandwidth += bandwidth }) log("Total bandwidth: $total_bandwidth MB/s") } # When running without arguments F main() { # exit() - exit code is 1 unless otherwise specified exit("Usage: ${ARGV0} --file FILE [--block_size BLOCK_SIZE] [--threads_count THREADS_COUNT] [--data_size DATA_SIZE]") }
  • Release v0.12.0 · rust-shell-script/rust_cmd_lib
    1 project | /r/rust | 9 Mar 2021
  • Convert tetris.sh and pipes.sh line-by-line to rust code
    1 project | /r/rust | 5 Mar 2021
    Thanks for the inspiration from previous posts, and I tried to convert pipes.sh to rust code today. It turned out to be very straightforward with the help of rust_cmd_lib, and your can check both language versions in the project examples directory.
  • rust_cmd_lib v0.10: to write shell-script like tasks in a clean, natural and rusty way
    2 projects | /r/rust | 24 Feb 2021
    Yes, your concern is correct and that's why I encourage people to use macros by default: https://github.com/rust-shell-script/rust_cmd_lib#security-notes

scripts

Posts with mentions or reviews of scripts. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-04-03.
  • How to do things safely in Bash
    9 projects | news.ycombinator.com | 3 Apr 2021
    If you’re interested in writing safe shell scripts then check out shellcheck:

    https://github.com/koalaman/shellcheck

    If you’re interested I’ve written a git hook for it that runs a check when you git commit:

    https://github.com/alblue/scripts/blob/main/shellcheck-pre-c...

    You should also check out her Google shell script style guide:

    https://google.github.io/styleguide/shellguide.html

  • Correct Git commits with Git-autofixup
    6 projects | news.ycombinator.com | 18 Mar 2021
    I wrote my own tool for this which allows you to fix up a file based on the last time you changed that file, or on a specific commit. It will then execute an interactive rebase to that point as well as taking care of stashing and then restoring unrelated files.

    https://github.com/alblue/scripts/blob/master/git-fixup

    I like the idea of having the editor definition return “true” instead of showing it; I’ll have to add that later.

What are some alternatives?

When comparing rust_cmd_lib and scripts you can also consider the following projects:

PowerShell - PowerShell for every system!

shellharden - The corrective bash syntax highlighter

makesure - Simple task/command runner with declarative goals and dependencies

git-instafix - Amend old git commits with a simple UI.

pipe-trait - Make it possible to chain regular functions

git-absorb - git commit --fixup, but automatic

shellclear - Secure shell history commands by finding sensitive data

oil - Oils is our upgrade path from bash to a better language and runtime. It's also for Python and JavaScript users who avoid shell!

ultraman - Manage Procfile-based applications. (Rust Foreman)⚙︎🔨

magit - It's Magit! A Git Porcelain inside Emacs.