File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -6,3 +6,4 @@ set -euo pipefail
66# The author got feedback that they're using too many exclamation marks (!).
77#
88# TODO: Write a command to output the contents of text.txt with every exclamation mark (!) replaced with a full-stop (.).
9+ cat text.txt | tr ' !' ' .'
Original file line number Diff line number Diff line change @@ -7,3 +7,8 @@ set -euo pipefail
77# so every Y should be a Z, and every Z should be a Y!
88#
99# TODO: Write a command to output the contents of text.txt with every Y and Z swapped (both upper and lower case).
10+ cat text.txt | tr ' YyZz' ' ZzYy'
11+
12+ # or we can do it this way where the tr command reads input from text.txt file and does the operation on the input
13+
14+ tr ' YyZz' ' ZzYy' < text.txt
You can’t perform that action at this time.
0 commit comments