Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

get cwd in shell script

#!/bin/bash
echo "Script executed from: ${PWD}"

BASEDIR=$(dirname $0)
echo "Script location: ${BASEDIR}"
 
PREVIOUS NEXT
Tagged: #cwd #shell #script
ADD COMMENT
Topic
Name
9+7 =