Skip to main content
16 events
when toggle format what by license comment
Nov 5, 2016 at 4:26 review Suggested edits
Nov 5, 2016 at 5:48
Nov 4, 2016 at 14:45 comment added user232326 @don_crissti The original answer: echo $(tac -s" " <<< $VAR) does not have a trailing space because the $(…) removes trailing newlines and spaces if the IFS has them. My solution will be corrected soon, thanks.
Nov 4, 2016 at 13:15 comment added Stéphane Chazelas With the current tac -s" " <<< "$VAR " version, it still inserts a leading blank line, adds a trailing space and omits the trailing newline character (as if printf '\n%s ' "$reversed_VAR" instead of expected printf '%s\n' "$reversed_VAR")
Nov 4, 2016 at 13:04 history rollback don_crissti
Rollback to Revision 4
S Nov 4, 2016 at 13:03 history suggested user232326 CC BY-SA 3.0
Included command to reverse file lines on BSD systems
Nov 4, 2016 at 12:41 review Suggested edits
S Nov 4, 2016 at 13:03
Nov 4, 2016 at 10:28 history edited Stéphane Chazelas CC BY-SA 3.0
Note that `tac` is a GNU-specific command.
S Nov 4, 2016 at 9:22 history suggested user232326 CC BY-SA 3.0
Found the correct way to do it.
Nov 4, 2016 at 9:14 review Suggested edits
S Nov 4, 2016 at 9:22
Nov 3, 2016 at 23:16 comment added user232326 @JhonKugelman Without the echo, the output has an additional newline, equivalent to this: echo $'100 \n90 80 70 60 50 40 30 20 10'
S Nov 3, 2016 at 19:20 history suggested John Kugelman CC BY-SA 3.0
`echo $(cmd)` can be simplified to `cmd`
Nov 3, 2016 at 18:58 review Suggested edits
S Nov 3, 2016 at 19:20
Nov 3, 2016 at 13:44 vote accept Alistair Hardy
Nov 3, 2016 at 13:44 comment added Alistair Hardy Cheers! That did the trick. I've still got a lot to learn
Nov 3, 2016 at 12:55 review Low quality posts
Nov 3, 2016 at 12:59
Nov 3, 2016 at 12:37 history answered Ipor Sircer CC BY-SA 3.0