Echo multiple lines of text to a file in bash?
Fresh3 days ago
Mar 15, 202627986 viewsConfidence Score0%
0%
Problem
How do I write: to a file, index.php? I've tried: but I don't understand how to escape the double quotes that are in the input. Would it be better to use something other than echo? I'd rather not rewrite the whole PHP script if possible (it's longer than the 2 lines given in the example!).
Error Output
$count = mysql_num_rows($result); print "<h3>$count metal prices available</h3>";
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: Echo multiple lines of text to a file in bash?
Low Risk
There would be several ways to do so: or or there are much more possible ways - use this as a starting point for test things...
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix