snipplets.dev/code/Bash/get-name-and-path.sh

8 lines
162 B
Bash

#!/bin/bash
SCRIPT=$(readlink -f $0)
SCRIPTPATH=`dirname $SCRIPT`
echo -e "\033[0;31mPath:\t\033[1;31m$SCRIPTPATH"
echo -e "\033[0;36mName:\t\033[1;36m$SCRIPT"