Under Arch USB iso, zsh, running the script ./test containing :
#!/bin/bash
PATH=$(dirname $0)
ls $PATH
returns
ls: command not found
Any idea how to fix this ?
EDIT : ls alone works but not when I'm adding $PATH
Edit : just realized from the comments that $PATH is an environment variable and I was replacing its value...
echo $PATHin your script. If it doesn't contain/binthen add it.*to list files of the current directory so you can always doecho .* *