I have bash script which modified file like this
sed -i "/hello world/d" /etc/postfix/virtual
and I ran this script from web application. sed command create temporary file in that directory but user under which web application works doesn't have permissions to create files in that directory. I do not want to give more permissions for the user to that folder. Is it possible to specify temp file location for sed command?
I am new in linux so sorry if my question is too easy but I didn't find any solution.
Thanks!
sed "..." /etc/.../virtual > new_file
Unless you really need to modify in place.