Skip to main content
7 events
when toggle format what by license comment
Jan 13, 2022 at 14:23 comment added Ed Morton General rule of thumb when writing debugging print statements - don't use the same string in multiple locations in those print statements or you won't be able to tell where that string came from when you see it in the output and so will be missing useful information.
Jan 13, 2022 at 14:18 comment added Ed Morton By using the same string, text at each end of your echo statement you can't tell when you see the string text in the output if it's the string from before $line or the same string from after it. Given that, when you say The whitespaces are missing and the text after $line as well. you're misdiagnosing the problem - it's not the text after $line that's missing, it's the text before it that's missing as it's being overwritten by the text after it. Change echo "text $line text" to echo "foo $line bar" and it'll be much easier for you to see what's really happening.
Jan 13, 2022 at 11:13 answer added FelixJN timeline score: 1
Jan 13, 2022 at 10:14 vote accept cd4user
Jan 13, 2022 at 9:46 answer added AdminBee timeline score: 2
Jan 13, 2022 at 9:37 history edited AdminBee CC BY-SA 4.0
Formatting
Jan 13, 2022 at 9:31 history asked cd4user CC BY-SA 4.0