Question

Trying to change all the characters in goodStuff file to uppercase. I want to use tr...

Trying to change all the characters in goodStuff file to uppercase.

I want to use tr '[a-z]' '[A-Z]' but don't know how to do the rest.

Can you help?

Homework Answers

Answer #1

Hey there!

You cannot modify the same file using tr command . But it is possible to store the output of this command in another file.For example:

$ tr "[a-z]" "[A-Z]" < goodStuff >output

This command uses goodStuff as input, and converts the characters from lowercase to uppercase.

or

$ cat goodStuff | tr "[a-z]" "[A-Z]" >output

This command reads the file using cat and then uses its output as the input for tr command then stores the output of tr command in output file

or

$tr "[:lower:]" "[:upper:]" < goodStuff>output

Please feel free to ask if you have any queries , in the comments.

Thumbs up appreciated:)

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
In matlab how to make it that i can be able to type in the file...
In matlab how to make it that i can be able to type in the file that I would like to test and to be able to test what algorithm i have. This is what i have so far. But I need help fixing the rest. Please help I need this asap. function FunctionAlgorithm() disp("Welcome to ___________ algorithm") filename = file = input('Type in the file to test: '); number = input('Type the number of the algorithm you want to...
Consider the following file arrest.dat containing information of a suspect that the police is looking for:...
Consider the following file arrest.dat containing information of a suspect that the police is looking for: arrest.dat: The police is looking for Robert Whiteshead, also known as Whity, ID number 4607091111027, from address 4 Azalea Court, 219 Belmont Street, Germiston, 2065, in connection with a bank robbery at UNITED BANK in January 2016. An amount of about R45,000,000 was stolen on this day. Apparently he had a helper that goes by the name of JOINT13. Mr Whiteshead was also an...
ONLY use method of alligation to solve the problem. I already know the answer, I want...
ONLY use method of alligation to solve the problem. I already know the answer, I want to know how to solve it with alligation. IF YOU DON'T KNOW WHAT ALLIGATION IS, DON'T ANSWER THE QUESTION. THIS IS FOR A PHARMACY EXAM. A health food store sells a mixture of raisins and roasted nuts. Raisins sell for $3.50/kg and nuts sell for $4.75/kg. How many kilograms of each should be mixed to make 20 kg of this snack worth $4.00/kg? ONLY...
how do I zip two files to create one zipped file on a Mac. I want...
how do I zip two files to create one zipped file on a Mac. I want to be able to unzip my file and my programs or txt files appear and not a folder containing the text file
Hello, I am trying to create a Java program that reads a .txt file and outputs...
Hello, I am trying to create a Java program that reads a .txt file and outputs how many times the word "and" is used. I attempted modifying a code I had previously used for counting the total number of tokens, but now it is saying there is an input mismatch. Please help! My code is below: import java.util.*; import java.io.*; public class Hamlet2 { public static void main(String[] args) throws FileNotFoundException { File file = new File("hamlet.txt"); Scanner fileRead =...
Finish this Code! We want to open a file called "names.txt" and display all of the...
Finish this Code! We want to open a file called "names.txt" and display all of the lines of the file as a list. Open the file in "reading" mode Use readlines to store the file into a list Use list indexing to display the 3rd item in the list This step is done for you! Close the file When you are finished, the output should match Desired Output. Notice: due to limitations with readine files in an online environment, the...
I am working on c # but I need to verify if a void type meets...
I am working on c # but I need to verify if a void type meets a condition to follow instructions but I don't know how to do it, I was trying to do it with an if in the following way but it gives me error someone could help me, or tell me how I can check the condition :( if ((lex.addtoken(analisis.Type.Words_Reserved_Planificador) == true)&&(lex.addtoken(analisis.Type.Symbol_Two_Points)==true)) { //Type is class Enum instruccions } else { Console.WriteLIne("Error :("); }
Hello, I am trying to do an assignment that requires writing an MSP432 code to add...
Hello, I am trying to do an assignment that requires writing an MSP432 code to add two 64 bit numbers together and store the result in memory location 0x2000_0000. The problem is that the it is a 32 bit register. I don't know how to add to a load 64 bit numbers. The question is below but please feel free to use your own examples, I will understand better. Thank you very much. Write a small MSP432 code segment that...
I am working on c # but I need to verify if a void type meets...
I am working on c # but I need to verify if a void type meets a condition to follow instructions but I don't know how to do it, I was trying to do it with an if in the following way but it gives me error someone could help me :( if ((lex.addtoken(analisis.Type.Words_Reserved_Planificador) == true)&&(lex.addtoken(analisis.Type.Symbol_Two_Points)==true)) { instruccions }else{ Console.WriteLIne("Error :("); }
Create an external style sheet and link it to an html file. Use css to style...
Create an external style sheet and link it to an html file. Use css to style the page and table. I don't want it to look like the default browser styling on anything. Use your own css, don't use the defaults from a css framework like bootstrap. Add some appropriate headlines, titles, and any other content you think is appropriate to the document. Get data from here: http://pds.jpl.nasa.gov/planets/special/planets.htm Use any 4 of the full planets (not pluto or small bodies)....
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT