Hello everyone. Before I get to the problem, it might help if I gave you a bit of a background on my problem(s).
I'm pretty new to nix, and taking an into to UNIX class at my college and it operates on the principle of learning UNIX with linux. Aside from the fact that my professor is a mad-woman and arguably incapeable of teaching (I asked her a question earlier via e-mail and she told me to wait 24 hours and if I couldn't find the answer to e-mail her again >.<). So here we are, unit 6, talking about X windows, GNOME & KDE and out of nowhere comes an assignment to write a batch file so I'm at somewhat of a loss, especially since asking the instructor is somewhat out of the question.
And we are not using our own machines but rather using SSH to connect to a college UNIX machine to work off of, that might be of some relevance too.
So the assignment is oddly themed to break a code, we have a main file to work off of, call it file1, and file2 and file3 to incorperate into it. File 1 is jumble and we use sed commands to change things in it and cat, sed, tr and what not to insert file2 and file 3 to hopefully have it make sense in the end.
The actual assignment description is:
And here is a sample of the actions we need to perform:Create a batch set of sed commands (i.e., a repeatable script) to make the following changes to blue_bird_of_paradise.txt
I can understand how to issue the commands as needed with sed to perform the actions requested with replacement but as far as a repeatable script, I am at a complete loss. I've tried working off a few basic tutorials but it seems as though I can't even begin to write the script as I get:Change all occurrences of * to t
Capitalize the first t in lines 5 and 11
Change all occurrences of 5 to dd
Change all occurrences of 4 to n
Change all occurrences of 2 to o
Change the first occurrence of o in lines 1, 2, and 6 to O.
#!/bin/bash
bash: !/bin/bash: event not found
or
#!/usr/bin/bash
bash: !/usr/bin/bash: event not found
If anyone has time could the point me in the right direction please?
Thank you all for your help ahead of time.
Bookmarks