Timeline for why does this sed edit break the oneliner?
Current License: CC BY-SA 4.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 10, 2020 at 14:06 | vote | accept | naphelge | ||
| Nov 10, 2020 at 10:06 | comment | added | Chris Davies | The -n has nothing to do with piping instead of printing. It tells sed only to generate output if there's an explicit print instruction | |
| Nov 10, 2020 at 10:05 | answer | added | Chris Davies | timeline score: 0 | |
| Nov 10, 2020 at 9:59 | comment | added | Chris Davies | So really what you're trying to debug is echo '45.60+0.21 (+0.46%)' | sed -n '/^\([0-9]*\.[0-9]*\)[+-].*$/\1/' | |
| Nov 10, 2020 at 5:46 | comment | added | muru | If it's not printing anything, there's nothing to pipe. | |
| Nov 10, 2020 at 5:27 | comment | added | naphelge | because the result should pipe instead of print | |
| Nov 10, 2020 at 5:04 | comment | added | muru | sed -n? Why -n? | |
| Nov 10, 2020 at 4:35 | history | asked | naphelge | CC BY-SA 4.0 |