This question already has an answer here:
- Formatted shell script output 3 answers
I have the following lines
3, 3, 100 4, 2, 50 8, 5, 80 . . .
and I want the following output
line starts at 3 and ends at 3 with value 100 line starts at 4 and ends at 2 with value 50 line starts at 8 and ends at 5 with value 80 . . .
I tried the following:
sed 's/^/line starts at /' then applying this command for the output:
sed 's/, / and ends at /' then applying this command for the output
sed 's/, / with value /'. Is there any way to do it in a single line?