Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Linux/Unix scripting and shell commands assistance: Write a script which determi

ID: 3605598 • Letter: L

Question

Linux/Unix scripting and shell commands assistance:

Write a script which determines which three letters most frequently end words in Spanish, French, Italian, and German. While the data need not be presented in HTML format, they should nevertheless be organized in tabular form for ease of reading. Clarification: what I'm after here is basically this: of all the 26 letters that appear as the very last letter in each language, what are the most frequent three of those individual letters. (In other words, this is very different than what is asked in question 5 below which is concerned with "trigrams" or sequences of three letters.) Data can be found on obsidian at /home/SRUNET/david.dailey/data/fr.txt (French) /home/SRUNET/david.dailey/data/es.txt (Spanish) /home/SRUNET/david.dailey/data/de.txt (German) /home/SRUNET/david.dailey/data/it.txt (Italian)

Explanation / Answer

Steve Bourne wrote the Bourne shell which appeared in the Seventh Edition Bell Labs Research version of Unix. Many other shells have been written; this particular torial concentrates on the Bourne and the Bourne Again shells. Other shells include the Korn Shell (ksh), the C Shell (csh), and variations such as tcsh. This turial does not cover those shells. Audience This turial assumes some prior experience; namely: Use of an interactive Unix/Linux shell Minimal programming knowledge - use of variables, functions, is useful background knowledge Understanding of some Unix/Linux commands, and competence in using some of the more common ones. (ls, cp, echo, etc) Programmers of ruby, perl, python, C, Pascal, or any programming language (even BASIC) who can maybe read shell scripts, but don't feel they understand exactly how they work. You may want to review some of the feedback that this tutial has received to see how useful you might find it. Typographical Conventions Used in This Turial Significant words will be written in italics when mentioned for the first time. Code segments and script output will be displayed as monospaced text. Command-line entries will be preceded by the Dollar sign ($). If your prompt is different, enter the command: PS1="$ " ; export PS1 Then your interactions should match the examples given (such as ./my-script.sh below). Script output (such as "Hello World" below) is displayed at the start of the line. $ echo '#!/bin/sh' > my-script.sh $ echo 'echo Hello World' >> my-script.sh $ chmod 755 my-script.sh $ ./my-script.sh Hello World $ Entire scripts will be surrounded by gray lines, and include a reference to the plain text of the script, where available: my-script.sh #!/bin/sh # This is a comment! echo Hello World # This is a comment, too! Note that to make a file executable, you must set the eXecutable bit, and for a shell script, the Readable bit must also be set: $ chmod a+rx my-script.sh $ ./my-script.sh

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote