Bash script name & path

This commit is contained in:
2024-03-28 17:39:03 +03:00
parent 9b63bbef61
commit 4b17968cc9
2 changed files with 8 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
#!/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"