Background When encoding messages one simple option is a substitution cipher. A substitution cipher replaces certain letters of the alphabet with…

Background When encoding messages one simple option is a substitution cipher. A substitution cipher replaces certain letters of the alphabet with other letters. For example, for each B in a message, a cipher may instead write Q and so on and so forth for the other letters of the alphabet. Unfortunately, a much more classic cipher was used last year, so this year I have produced a completely contrived one!! Here is the logic. It is a variation on the idea, that you replace A with Z, B with Y, C with X and so on through the alphabet. In essence the first letter becomes the last letter. To make this arbitrarily annoying to program, I have decided to instead of just reversing from A to Z, the program should be able to arbitrarily shuffle from any start point to any end point. For example: If I swap from C to F, all C’s becomes F’s, all D’s become E’s, all E’s become D’s, all F’s become C’s. All other letters remain unchanged. Now, fortunately Unix has a function that will greatly simplify this process called translate (shortened to tr). If given a few parameters, translate can perform an arbitrary cipher. For example: tr ‘[abc]’ ‘[123]’ Will simply turn all a’s into 1’s, all b’s into 2’s and all c’s into 3’s. Translate also has a neat hyphen syntax for translating consecutive characters. tr ‘[a-m]’ ‘[A-M]’ … will convert the first 13 letters of the alphabet (a-m) from lower case to upper case! This won’t be particularly useful for this practical (or maybe it will?). However translate is essential for those who don’t want to lose their minds.Task 1 Write a shell script called create_pattern.sh (the name must be EXACTLY correct) that takes two switches as parameters. The idea is that create_pattern will output a string suitable for translation that looks something like this: tr ‘[ABC]’ ‘[CBA]’ The switches are defined as follows: • -u: Where present (can be absent) will apply the rule to only UPPER CASE LETTERS • -s: Will be followed by two parameters, both integers representing the first and last letter (INCLUSIVE) which will be involved (and thus all the letters in between) where A=1 and Z=26 (whether upper or lower case). If it is still not clear, here is an example: • ./create_pattern -u -s 5 7 Will produce: • tr ‘[EFG]’ ‘[GFE]’ If it is still not clear, here is an example: • ./create_pattern -s 15 19 Will produce: • tr ‘[opqrs]’ ‘[srqpo]’ Please don’t do the opposite. I can’t be bothered writing two marking scripts WARNING: There is a very stupid way to do this practical. You could write a giant if-else statement for each possible pair of input numbers. That said, given there are ~650 legal combinations… I mean, why would you do this? It will not be met with… happiness (by that I mean good marks or… marks).Attachment 1Attachment 2Background When encoding messages one simple option is a substitution cipher. A substitution cipher replacescertain letters of the alphabet with other letters. For example, for each B in a message, a cipher mayinstead write Q and so on and so forth for the other letters of the alphabet. Unfortunately, a muchmore classic cipher was used last year, so this year I have produced a completely contrived onel! Here is the logic. It is a variation on the idea, that you replace A with 2, B with Y, C with X and so onthrough the alphabet. In essence the first letter becomes the last letter. To make this arbitrarilyannoying to program, I have decided to instead ofjust reversing from A to Z, the program should beable to arbitrarily shuffle from any start point to any end point. For example: If I swap from C to F, all C’s becomes F’s, all D’s become E’s, all E’s become D’s, all F’s become C’s. Allother letters remain unchanged. Now, fortunately Unix has a function that will greatly simplify this process called translate(shortened to tr). If given a few parameters, translate can perform an arbitrary cipher. For example:tr ‘[abcl’ ‘[1231’ Will simply turn all a’s into 1’s, all b’s into 2’s and all c’s into 3’s. Translate also has a neat hyphen syntax for translating consecutive characters.tr ‘[a-m]’ ‘[A-M]’ will convert the first 13 letters of the alphabet (a-m) from lower case to upper case! This won’t beparticularly useful for this practical (or maybe it will?). However translate is essential for those whodon‘t want to lose their minds.

Give us your instructions.
Select the type of service you need: writing, calculations, or programming. We’ve created an intuitive order form that tells you what information to enter and where, so make sure to fill out each required field. Also, make your requirements as specific as possible. Don’t rush! Take your time and explain everything in detail how it works.

Proceed to checkout and enter your credit card details or PayPal login, how to pay. Follow the payment provider’s instructions to confirm the transaction.
Now your order is in our system! We’ll start processing it right away.

Place Your Order

Contact Us

Frequently asked questions
Is your service confidential?

When you place an order with our company, we ask you to provide us with such personal information as your name, phone number, and email address. We need this data to keep you updated on the important things related to your order or account.

Is there a possibility of plagiarism in my completed order?

We complete each paper from scratch and in order to make you feel safe regarding its authenticity, we check it for plagiarism before its delivery. To do that, we use our in-house software, which can find not only copy-pasted fragments but even paraphrased pieces of text. Unlike popular plagiarism detection systems that are used by most universities (e.g. Turnitin.com), we do not report to any public databases—therefore, such checking is safe.

We provide a plagiarism-free guarantee that ensures your paper is always checked for its uniqueness.

Is there a money-back guarantee? If yes, how can I receive a refund?

You can certainly get your money back in several cases. You can receive a full refund if you have paid for your order twice or if you have placed two identical orders. In case your paper was late or the quality of the paper does not correspond to your expectations, you will get compensation for these issues.

Do you keep a database of pre-written essays?

No, we do not have such a database. All papers you order from us are written from scratch. This means your paper is unique and has never been published before—neither will it be published after we deliver it to you.

 

When will my custom paper be done?

While placing an order with WritersHub, you can choose a period of time within which a paper should be delivered to you. The countdown until the specified deadline starts automatically from the moment we receive your payment in our system. For example, if you pay for your order at 6pm on Monday and choose a 3-day delivery option, you will receive your custom paper by 6pm on Thursday.

Remember that a writer needs a sufficient amount of time in order to conduct thorough research. Therefore, please choose the most suitable deadline when you place an order. Moreover, the later you need your paper to be delivered to you, the cheaper it will be. Thus, you will be able to save your money while your writer will have enough time to work on your order and ensure its quality.

Make sure you upload all the additional materials at the very beginning. If you fail to do that, the deadline for your order will be postponed as well.

I haven’t received my custom paper by the deadline. What should I do?

Let us know immediately about that. You can do it by writing a message on Facebook or email us. Our support manager will carefully examine your order and will assist you with it right away. The reasons for late delivery may vary from time to time. It can happen that you have entered a wrong email address or your spam filter does not allow you to receive emails from us. It is also possible that the writer is waiting for your reply and can not continue working without your assistance, or we are checking the work for plagiarism. Whatever the case may be, contact us if you have any problems with getting your order on time.