News for hackers. Stuff that matters.
Re:Show HN: Ultimate Plumber – a tool for writing Linux pipe... by pareshverma91 on Thursday October 25, 2018 @03:03AM (#18299032)
Looks great. Personally, I have been using a "cache" function to cache output of expensive commands. This has helped me iterate faster on pipelines that call into apis.

  function cache {
      cmd="$*"
      name=$(echo "$cmd" | base64)
      if [[ -f ./cache/$name.exit ]] && [[ $(cat ./cache/$name.exit) -eq 0 ]]; then
          echo "cached"
      else
          mkdir -p ./cache
          eval "$cmd" > ./cache/$name.out
          echo $? > ./cache/$name.exit
      fi
      cat ./cache/$name.out
  }

  cache ls /
Re:Show HN: Ultimate Plumber – a tool for writing Linux pipe... by zbentley on Thursday October 25, 2018 @08:34AM (#18300373)
I use something similar, created by a friend of mine, called 'bash-cache': https://bitbucket.org/dimo414/bash-cache/src/default/

It hooks specific functions in Bash and keys off of their arguments.

Re:Show HN: Ultimate Plumber – a tool for writing Linux pipe... by kapad on Thursday October 25, 2018 @06:07PM (#18305007)
I like this. I currently do the "plumbing" the OP refers to using files. This has generally worked for me, but want to give this tool a test run and see if it's faster than my current approach and this cache command.