noahgift / Coursera-DE-C2-bash-cli-reverse-string

A lab on reversing a string in Bash using a cli

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Coursera-DE-C2-bash-cli-reverse-string

A lab on reversing a string in Bash using a cli

Goal: Bash CLI

For this project you will create a command-line tool that reverses a string

Part 1: Run a script and pipe it into a string reversal bash utility rev

  1. Run the script ./palindromes.sh to print a common list of palindromes (words that are the same backwards and forward).
  2. Now run them through a string reversal command: ./palindromes.sh | rev

Part 2: Build a CLI string reverser tool

  1. Run the script ./reverse with a few words to reverse them: ./reverse.sh foo bar biz
  2. What happened?
  3. Modify the print statement slightly to use a ":" instead of a "-" in the output.

Part 3: Build a CLI string reverser tool

  1. Run the following command: ./palindromes.sh | xargs ./reverse.sh
  2. Explain the output result and why xargs was necessary to achieve it.

About

A lab on reversing a string in Bash using a cli


Languages

Language:Shell 100.0%