Skip to content

Instantly share code, notes, and snippets.

@qerub
Last active August 29, 2015 14:02
Show Gist options
  • Save qerub/a4628d26a92bcd86ef7c to your computer and use it in GitHub Desktop.
Save qerub/a4628d26a92bcd86ef7c to your computer and use it in GitHub Desktop.
Bash script to exec program in given working directory
#!/bin/bash
# Usage: cwd.sh /app /usr/bin/python example.py
cd $1 && exec "${@:2}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment