Ask HN: Share a shell script you like

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB high-performance time series database
Collect, organize, and act on massive volumes of high-resolution data to power real-time intelligent systems.
influxdata.com
featured
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
  1. spellbook

    🪄 Shell and Powershell scripts registry (by jmaczan)

    Hi, I'd like to ask what are the shell scripts you enjoy using or find useful?

    It might be something you incorporated to your terminal-based workflow. Or maybe some specific scripts that you often reuse. Or you have used it once, but it might be useful to other people. Or maybe you just have a script that is fun to use? Please share

    My (not anymore) hidden intention is to gather your recommendations to build an open-source shell script registry Spellbook https://spellbook.maczan.pl/ Source code is here for you if you want to self host or fork it https://github.com/jmaczan/spellbook

    A script I sometimes use is a commands repeater https://github.com/jmaczan/spellbook/blob/main/registry/spells/repeat-sh/spell.sh You can specify an interval and a flag to reset/keep the terminal's content after a script invocation

    Thanks!

  2. InfluxDB

    InfluxDB high-performance time series database. Collect, organize, and act on massive volumes of high-resolution data to power real-time intelligent systems.

    InfluxDB logo
  3. z

    z - jump around

    - quickly jump to recent directory: https://github.com/rupa/z - however I find it kinda annoying it seems to forget/ignore(?) directories, anyone know of a better version of this?

    - quickly opening my personal wiki: https://github.com/francium/dotfiles/blob/master/bin/.local/...

    - re-run a script when a file changes: https://github.com/francium/dotfiles/blob/master/bin/.local/...

    For `while-watchdo` you, you run it like `while-watchdo "echo hi"`, then in my editor, I have a custom shortcut that does `touch .watchfile` causing the command, in this case `echo hi` to run. I prefer this to tools that retrigger commands as soon as you save _any_ file. Also works in docker containers, edit a file on host, command runs in a container.

  4. dotfiles

    - quickly jump to recent directory: https://github.com/rupa/z - however I find it kinda annoying it seems to forget/ignore(?) directories, anyone know of a better version of this?

    - quickly opening my personal wiki: https://github.com/francium/dotfiles/blob/master/bin/.local/...

    - re-run a script when a file changes: https://github.com/francium/dotfiles/blob/master/bin/.local/...

    For `while-watchdo` you, you run it like `while-watchdo "echo hi"`, then in my editor, I have a custom shortcut that does `touch .watchfile` causing the command, in this case `echo hi` to run. I prefer this to tools that retrigger commands as soon as you save _any_ file. Also works in docker containers, edit a file on host, command runs in a container.

  5. ShellCheck

    ShellCheck, a static analysis tool for shell scripts

    shellcheck, whilst not a script itself, I do find it useful when writing them.

    - https://github.com/koalaman/shellcheck

  6. atuin

    ✨ Magical shell history

  7. diffconflicts

    A better Vimdiff Git mergetool

    diffconflicts [dc] lets you resolve diffs as a two way diff between what's in the conflict markers instead of including the resolved parts in the diff. It opens the diff in vim but could be adapted for other editors. Verbose explanation: https://github.com/whiteinge/diffconflicts/blob/master/READM...

    The author converted it to a vim plugin with the same name, but I use a different vim plugin implementation [mergetool].

    [dc]: https://github.com/whiteinge/dotfiles/blob/master/bin/diffco...

  8. dotfiles

    dotfiles for vim, git, zsh, tmux, cwm, xinit, and many others. (by whiteinge)

    diffconflicts [dc] lets you resolve diffs as a two way diff between what's in the conflict markers instead of including the resolved parts in the diff. It opens the diff in vim but could be adapted for other editors. Verbose explanation: https://github.com/whiteinge/diffconflicts/blob/master/READM...

    The author converted it to a vim plugin with the same name, but I use a different vim plugin implementation [mergetool].

    [dc]: https://github.com/whiteinge/dotfiles/blob/master/bin/diffco...

  9. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  10. vim-mergetool

    Better vim-based mergetool (by idbrii)

  11. fuz

    Fuz is a blazingly fast text, file and folder search tool

    I use Fuz for interactively searching my note collection, across a couple hundred text files. It's extremely useful for rapidly finding code-snippets, meeting notes or specific project information. And fast, especially combined with a hotkey for iTerm 2 that pops up a terminal and lets you search within a few keypresses.

    https://github.com/Magnushhoie/fuz

    As a nice side-effect, I no longer worry about where I store text (e.g. with Obsidian), as I know I'll find it again if it's there. It helps using memorable keywords though.

  12. swift-sh

    Easily script with third-party Swift dependencies.

  13. zoxide

    A smarter cd command. Supports all major shells.

    Zoxide is basically the 'Rust Rewrite' version of the 'Z' tool and is actively maintained, I haven't had any issues with it: https://github.com/ajeetdsouza/zoxide

  14. autobots

    ⚡️ Scripts & dotfiles for automation and/or bootstrapping new system setup

    I have quite a few, my personal collection of shell scripts: https://github.com/fastily/autobots

    I also curate a shell command cheatsheet: https://github.com/fastily/cheatsheet

  15. cheatsheet

    📜 A compendium of CLI commands I can't stop looking up (by fastily)

    I have quite a few, my personal collection of shell scripts: https://github.com/fastily/autobots

    I also curate a shell command cheatsheet: https://github.com/fastily/cheatsheet

  16. tools

    all-in collection of productivity scripts, CLI tools, utility libraries, fuse filesystems, and also some stuff (by bAndie91)

    my collection: https://github.com/bAndie91/tools/tree/master/user-tools

  17. stderred

    stderr in red (by ku1ik)

    2. Installing all of my custom scripts as 'programs' (complete with a bin directory, for easy inclusion in my PATH) under /opt/my for better tracking/management, as opposed to e.g. /usr/local/bin

    3. A 'checkupdates' alias which performs update-checks via multiple systems (in my case: apt, flatpak, and my totally awesome misc-updater - see here if interested: https://sr.ht/~tpapastylianou/misc-updater/)

    4. libstderred (https://github.com/ku1ik/stderred)

    5. The following exports (I'll let you decipher them)

      export LESS="-I -R -S -j.5 -#2"

  18. fzf

    :cherry_blossom: A command-line fuzzy finder

    Not necessarily a shell script, but fzf with bash keybindings improved my shell experience more than anything.

    https://github.com/junegunn/fzf#key-bindings-for-command-lin...

  19. pyxargs

    Command line Python scripting with an xargs-like interface and AWK-like capabilities for data processing and task automation

    pyxargs --py "print('{}') if os.path.ismount('{}') else ''" | pyxargs fusermount -u {}

    My primary use case was using this with ffmpeg due to the encoding problem with xargs [2].

    It can also run commands in parallel using a terminal multiplexer so outputs don't get mixed up or if they require user input.

    [1] https://github.com/elesiuta/pyxargs

  20. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • New Names / Renaming for Oil?

    5 projects | /r/oilshell | 29 Aug 2022
  • FZF: make CTRL-T work with directories outside the current one

    2 projects | /r/commandline | 10 Aug 2022
  • IDE-style autocomplete for your terminal

    3 projects | /r/emacs | 24 Mar 2022
  • Creating a bash completion script (2018)

    6 projects | news.ycombinator.com | 2 Mar 2022
  • A list of "curl pipe in to shell" to install projects

    8 projects | /r/commandline | 22 Apr 2021