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)