I have this multilinie heredocument which I desire to translate into a uniline herestring:
cat <<-"PHPCONF" > /etc/php/*/zz_overrides.ini [PHP] post_max_size = 200M upload_max_filesize = 200M cgi.fix_pathinfo = 0 PHPCONF
The closest I could get is as follows:
cat >"/etc/php/*/zz_overrides.ini" <<< "[PHP] post_max_size = 200M upload_max_filesize = 200M cgi.fix_pathinfo = 0"
but I don't think line breaks after each directive is possible, given the end result is one string. Maybe there is some "unorthodox" way after all?
Both the heredoc, and herestring, are aimed to replace this heavy sed operation:
sed -i "s/post_max_size = .M/post_max_size = 200M/ ; s/upload_max_filesize = .M/upload_max_filesize = 200M/ ; s/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/" /etc/php/*/fpm/php.ini