From 8f4b3a54643658c1cf5a8ad4fe81400aff01fae0 Mon Sep 17 00:00:00 2001 From: Ohad Livne Date: Wed, 2 Jul 2025 13:15:07 +0300 Subject: [PATCH] Create a script that sets the working directory for a process --- .local/bin/with-cwd | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 .local/bin/with-cwd diff --git a/.local/bin/with-cwd b/.local/bin/with-cwd new file mode 100755 index 0000000..df3ee83 --- /dev/null +++ b/.local/bin/with-cwd @@ -0,0 +1,7 @@ +#! /usr/bin/bash + +set -euo pipefail +IFS=$'\n\t' + +cd "$1" +"${@:2}"