I have the following command that I am trying to run. The problem is every time I run the script it says it cannot find the file or directory.
awk -v host=$host -v stockcode=$other1 '{sub(/DIGICODE/,host);sub(/SYSMAN/,stockcode); print }' ${web}service/cert.html >> ${web}service/cert_new.html
So cert.html is my template, cert_new.html is my desired output file.
${web} is my servers IP address ie "127.0.0.1/test/" $host and $other1 are local variables inside my bash script.
Now when it runs the output is the following :
127.0.0.1/test/service/cert_new.html: No such file or directory
I am not sure if Awk is the best way to go ?