bash script change directory run a command code example
Example 1: bash script change directory run a command
#!/bin/sh
cd "$1" && shift && "$@"
Example 2: bash script change directory run a command
cd DIRECTORY_HERE; COMMAND_WITH_ARGS_HERE
#!/bin/sh
cd "$1" && shift && "$@"
cd DIRECTORY_HERE; COMMAND_WITH_ARGS_HERE