I'm creating a .command file (with macOS) that I want to be able to drop into any folder and have it create a .txt file relative to what ever folder it exists in.
Eg.
cd .
echo -e "write this to the log" >> log.txt
exit
The above doesn't work though. I've also tried cd pwd
.
Is this possible to do?