Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm having trouble coming up with the right way to write this in linux. Use 'tr' to convert sed_edits.txt to lowercase and then put each

I'm having trouble coming up with the right way to write this in linux.

Use 'tr' to convert sed_edits.txt to lowercase and then put each word in sed_edits.txt on a single line.

Step 2a convert to lowercase

  • Run echo aBcDeF > letters.txt to create a test file
  • Run cat letters.txt | tr '' '' to verify that and converts uppercase to lowercase
  • See slide "Useful tr conversions" for hints.

Step 2b one word per line

  • HINT: Every word is followed by a space. So what character can be converted to put each word on a single line?
  • See slide "Useful tr conversions" for suggestions.
  • Run echo a b c d > words.txt to create a test file
  • Run cat words.txt | tr '' '' to verify that and puts each letter on its own line
  • Run cat sed_edits.txt | tr '' '' | wc l. It should return the value 1333. NOTE: The 'wc' option is the lowercase "el"

Step 2c chain the commands

  • Chain all of these 'tr' commands together using the pipe operation and rediect the output to tr_edits.txt
  • The command chain should look like

'cat sed_edits.txt | tr '' '' | tr '' '' > tr_edits.txt

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions