sed and special characters inside a variable (macOS Monterey)

I’m new to shell scripting and Terminal usage. I have the follow line of code in a zsh script, where the PATH_VAR is always an absolute folder path that I have to insert: #!/bin/zsh … read PATH_VAR sed -i ” ‘s/"PATH_VAR=.*"/"PATH_VAR=$PATH_VAR"/’ file.txt … The idea is to replace the variable value on a text file,… Read More sed and special characters inside a variable (macOS Monterey)

PHP shell script in Automator MacOS Monterey no longer works

MacOS Monterey no only seems to support PHP within Automator. You can run PHP from the Terminal without error (if installed via Brew) but running PHP scripts from Automator in a "Run Shell Script" gives the error php: command not found In the Terminal, running which php Results in /usr/local/bin/php. Interestingly the newer Shortcuts app… Read More PHP shell script in Automator MacOS Monterey no longer works