Skip to content

Commit d619370

Browse files
committed
Complete sed script-05: reorder number and text using capture groups
1 parent ba97190 commit d619370

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

individual-shell-tools/sed/script-05.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
set -euo pipefail
44

55
# TODO: Write a command to output input.txt with one change:
6+
sed -E 's/^([0-9]+) (.*)$/\2 \1/' input.txt
67
# If a line starts with a number and a space, make the line instead end with a space and the number.
78
# So line 6 which currently reads "37 Alisha" should instead read "Alisha 37".
89
# The output should contain 11 lines.

0 commit comments

Comments
 (0)