I make file "my.sh" and in the file I write code
if [ $# = 0 ]; then
echo "filename: $0"
fi
and I execute my.sh
file
$ my.sh
-> I want output [filename: my.sh
]
however, the result shows [filename: ./my.sh
]
I finally want when I enter my.sh
, the output shows [filename: my.sh
] and when I enter ./my.sh
, the output shows [filename: ./my.sh
]