write a bash script in UNIX that will prompt the user to enter a series of test scores. Continue entering test scores until the user enters the word "finished". Output the students average test score and his/her final letter grade.below 60 =F,60-69 D,70-79 C,80-89 B, ABOVE 90
Q: Write a shell script with a while loop that keeps on accepting a string and outputs the string till…
A: #infinite while loop to read input and display while [ 1 ]do echo "Enter the string" read str…
Q: 1. Write a Python script to save the dictionary words in the 'wordlist.txt' file, and then compress…
A: python script to store dictionary word and compress it to a zip file with protected password.
Q: (a) Write a shell script to print a given number (use read to get the number) in reverse order and…
A: #asking user for inputecho "Enter a number"read num rem=0reverse=0sum=0#this will iterate over each…
Q: Write a Powershell script program (evenodd) which adds the odd numbers in odd lines and adds the…
A: Solution:: file=$1 count=0 # even file name even="evenfile." </p><p>…
Q: Write a shell script which takes your date year and tells your age
A: echo -n "Enter your DOB [ddmmyyyy] : "read nd=`echo $n | cut -c1-2`m=`echo $n | cut -c3-4`y=`echo $n…
Q: Create a random access file in C drive, write numbers 1 to 100 into that, add number 1000 in 10th…
A: import java.util.*;import java.io.*;import java.nio.*;public class Main{ public static void…
Q: In Unix Say your birthday is 1980-11-1. How to use cal to display the calendar of the month…
A: The cal is a command to display the calendar and it can be used to display a single date, day, week,…
Q: Write a shell script for the calculator program, your script has to display the menu showing the…
A: Here, Code instruction is given.
Q: Write a shell script that does the following tasks: Script takes as input, Employee Name, Employee…
A: Required:
Q: If someone types the following within a Unix script, what does $1 mean? for username in `awk -F:…
A: Answer: What does $1 mean: It is first command-line argument. It passes to the shell script. It is…
Q: Question: Write a bash script to test all Athematic and logical operators in Linux Operator:…
A: Solution:-
Q: xactly do you mean by Linux Kernal? Is it permissible to alt
A: As we know Technically, Linux is not an operating system, an operating system is system software…
Q: Write a shell script to print all the prime numbers between 2 and the number which is given as an…
A: I have provided a solution in step2.
Q: e a POWERSHELL (not shell, specifically Powershell) script program (evenodd.ps) which adds the odd…
A: Answer:- Below are the commands to do your given task. $lines = (Get-Content $filepath).split('\n')…
Q: Write a shell script to read the choice , based on the choice do the temperature conversion and…
A: I have provided code and output in step 2.
Q: Write a shell script program (evenodd.sh) which adds the odd numbers in odd lines and adds the even…
A: Take numbers as inputs. Segregate odd and even numbers. Print sum of odd numbers on line 1. Print…
Q: sing Unix Write a Bash script that checks for all executable files in your home directory and…
A: Given Using Unix Write a Bash script that checks for all executable files in your home directory…
Q: Write a bash script by accepting two variables and perform four mathematical operation such as…
A: #!/bin/sh a=10b=20 val=`expr $a + $b`echo "a + b : $val" val=`expr $a - $b`echo "a - b : $val"…
Q: Write a shell program to copy the contents of file named "class.txt" to "linux.txt".
A: Lets see the solution.
Q: Write bash script which takes array as an input of size 10 bind its even indexes to accept even…
A: The, script has given below:
Q: Bash Shell Script Programming Assignment Question 1. Create a shell script file called q1.sh Write a…
A: Answer is given below. Q1) To check if the given 2 strings are equal. #!/bin/bash read s1 #read…
Q: Here is a short snippet: 1: #!/bin/bash 2: echo -e "This is a sample shell script.\t It displays…
A: The program is written in Linux Script. Please check the source code and output in the following…
Q: utes the gross salary of an employee according to the following using Switch statement if…
A: Given : Write a shell script that computes the gross salary of an employee according to the…
Q: Write a bash shell program to check current month of calendar.
A: To write the bash shell program to display the current month of the calendar. The bash shell is a…
Q: write a BASH script that will: a) use an UNTIL loop b) Ask for input from the user C) Add the…
A: Until loop is used to execute a set of given instructions as long as the given condition checks to…
Q: Write a shell script to ADD two numbers
A: This is very simple. According to the question, the shell script reads two numbers as command line…
Q: Write a UNIX script file that checks whether the user entered number is multiple of 9 and displays a…
A: 1) Below is UNIX script which checks if user entered number is multiple of 0 and display related…
Q: Write a Bash script to output the following sequence using any of the loops
A: Objective: This program displays the given diamond-shaped pattern including numbers. This problem…
Q: a shell script that takes name of directory and deletes all the sub directories of size 0. The…
A: for file in * doif [-f $file -a ! -S $file ]; then echo "Delete $file [y/n] \c" read ans…
Q: b) Write a shell script, which first ask the user for a number. then, -> Print "Panther" if the…
A: here I mentioned Shell script program as per given problem.
Q: script
A: Given :- It is given that the two files, almost identical text files (only a few bits are flipped…
Q: Write a bash script that will run the command getReading1.sh and getReading2.sh to read values from…
A: Below is the solution;
Q: 5- The following MATLAB commands are saved in script files called exp5_a.m, exp5_b.m, and exps_c.m,…
A: 5. 1. For every outer loop execution, inner loop executes 2000 times. Outer loop executes, 1000…
Q: Write a bash shell script that will enter the marks of a student and decide whether he has “passed”…
A: Hi. Let's move on to the script in the next step. I have included comments that will help you in…
Q: Write a shell script to input a number. Find the sum of individual digits of a given number and…
A: Write a shell script to input a number. Find the sum of individual digits of a given number and…
Q: UNIX Systems Programming A snippet from a shell script is given below: line1 ... while read num…
A: Arrays in Shell script: Newer versions of Bash support one-dimensional arrays. Array elements may be…
Q: For compiling a C program without leaving the editor, which command will be used? a) cc % b) :! Cc…
A: Q. For compiling a C program without leaving the editor, which command will be used? a) cc % b) :!…
Q: Write a shell script that allows the user to enter six numbers, and sends it to a file. After which,…
A: Objective: Here, we need to write a shell script to read six numbers from the user and send the…
Q: Write a shell script to read a sequence of zeros and ones as a binary number and return the…
A: Here is the script of above problem. See below steps for scripts.
Q: Write a bash script using a while loop that will ask for input until it gets the secret word
A: A bash script may be a document containing a series of commands.Bash script can read input from…
Q: Write a bash shell program to check current month of calendar.
A: cal command is used to print calendar in Linux ,by default it print current month calendar. syntax…
Q: Write a shell script that prompts the user for a grade between 0 and 100. The shellscript should…
A: Program: #The program reads the characters from the user to enter the #grade and returns the…
Q: Write a shell script to check if a number is even or odd, if number is even calculate factorial of a…
A: The solution for the above-given question is given below:
Q: Write a Bash script to output the following sequence using any of the loops.…
A: I have given code below
Q: tements to do the following: a. Create the Socket object to make a connection to a server named…
A: Suppose we have a client Socket called surClient. Write java statements to do the following: a.…
Q: rint the factor
A: Code: # shell script for factorial of a number# factorial using for loop echo "Enter a number" #…
Q: Unix time/ Epoch time is the number of seconds since midnight of January 1st 1970. Given the text…
A: (answer):- sudo chmod 777 gpgencryption.sh 4=read 2=write 1=execute
Q: Q1: write a shell script which can read "N" number of command line arguments and it should print the…
A: let us name the file shell.sh the code in this file will be echo $# for i in $@ do sum=`expr $sum +…
Q: Develop a single shell script which can do the following task: a. Take input of n employees salary…
A: Shell script: read -p "Enter the number of employee as n: " n #reading the input for value…
Q: Q1) The following problems can be solved by writing commands in the command window, or by writing a…
A: Required: None
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- Write a BASH script that will: Ask the user to input a number. Use if/elif/else to If number is < 10 display “Very Low” If number is between 10 and 50 display “That’s the stuff” If number is between 50 and 100 display “It’s getting warm” If number is greater than 100 display “Danger! Danger! Danger!”Write a bash shell script program that prompts the user to enter a list of 10 student names and check the number of occurrences of "Emily". Your program should display the result. Sample input: Emily Susan Lily Ashley John Alex Nancy Tim Michael Emily Your program output should be: Emily appeared 2 timesUse the Bash shell for the completion of this project. Develop a shell scripting application that allows the user to perform some advanced mathematical operations. Your application should allow the user to perform these tasks: Task 1: Find the even multiples of any number chosen by the user in a given range – the user should specify the multiples of which number they want to print and a minimum and maximum value. The multiples printed should be within the [minimum, maximum] range. For example, if the user chooses the number 7 and would like to print all even multiples in the [15, 60] range, the program should print all the even multiples that are bigger than or equal to 15 (minimum), but smaller than or equal to 60 (maximum). The program should keep a count of how many numbers were printed and should output that count, as well as the numbers. The output then, for the example given, should be 28, 42, 56, and the count should be 3.
- Unix-based operating systems usually include a tool named tail. It displays the last 10 lines of a file whose name is provided as a command line argument. Write a Java program that provides the same behavior i.e. the user can specify how many lines to print from the terminal. Display an appropriate error message if the file requested by the user does not exist, or if the command line argument is omitted. Note: Make sure to display the last n lines of a file whose name is provided as a command line argument. You might need to pass a file as an argument, therefore make sure to have access to a sample file, the contents of which you want to print out.Write a program that reads a file containing two columns of floating-point numbers Prompt the user of the file name.Print the average of each column. javaPython: How do I format a number so that I get exactly 5 digits and then pad zeros after? I want to also round. I am reading a file and then writing those contents to another file. Original file: 1234.3092 1234.0 8912.32 I want just 6 digits so the new file should read 1234.31 1234.00 8912.32
- Write a program to calculate students’ average test scores and their grades.You may assume the following input data is read from a text file.Johnson 85 83 77 91 76Aniston 80 90 95 93 48Cooper 78 81 11 90 73Gupta 92 83 30 69 87Blair 23 45 96 38 59Clark 60 85 45 39 67Kennedy 77 31 52 74 83Bronson 93 94 89 77 97Sunny 79 85 28 93 82Smith 85 72 49 75 63Use three arrays: a one-dimensional array to store the students’ names, a (parallel) two-dimensional array to store the test scores, and a parallel one-dimensional array to store grades. Your program must contain at least the following functions: a function called GetData to read and store data into two arrays, a function called Average that is used to calculate the average test score and grade, and a function called PrintResults to output the results. The student names should be to the left with a width of 10 columns. The test scores should be to the right with a width of 8 columns. Have your program also output the class average on a line…In Python do the following: Write a program that reads a list of temperatures from a file called temps.txt, converts thosetemperatures to Fahrenheit, and writes the results to a file called ftemps.txtPlease do this in PYTHON PROGRAMMING Write an address book program that stores your contacts' names and their email addresses. The names and email addresses are originally stored in a file called phonebook.in, in the format:Harry P..d@hogwarts.eduHermione G..h@hogwarts.eduRon W..b@hogwarts.eduDraco M..s@hogwarts.eduSeverus S..e@hogwarts.eduAlbus D..x@hogwarts.eduYour program should read from the file, storing the names and corresponding email addresses in a dictionary as key-value pairs. Then, the program should display a menu that lets the user enter the numbers 1 through 5, each corresponding to a different menu item:1) look up an email address2) add a new name and email address3) change an email address4) delete a name and email address5) save address book and exitWhen the user enters 1, the program should prompt them for a name, and then print the corresponding email address. If there is no dictionary entry under that name, the program should print, "Sorry, no contact exists…
- This is a python file Fix this code and the output is the attachment #filename: modValidateEmail.py def isValidMSUMEmail(email): if email.count('@') != 1: return False tmp= email.split('@') if len(tmp) == 0: return False userName = tmp[0] if not userName[0].isalpha(): return False for c in userName: if not c.isalpha() and c != '.': return False inst= tmp[1] if inst != 'mnstate.edu': return False else: return True #filename: UnitTestValidEmail.py from unittest import * from modValidateEmail import * class TestValidEmail(TestCase): #create a subclass of unittest.TestCase def testUserName(self): self.assertEqual(isValidMSUMEmail('.joe@mnstate.edu'),False) self.assertEqual(isValidMSUMEmail('joe4@mnstate.edu'),False) self.assertEqual(isValidMSUMEmail('joe$smith@mnstate.edu'),False) self.assertEqual(isValidMSUMEmail('joe.smith@mnstate.edu'),True) def…Language: Python i have a txt named "hightemp.txt" Output text in the first column of TXT file. If you encounter duplicate text, skip it (that is, the same text appears only once) please help me , thanks Here is the content of "hightemp.txt" A AA 41 2013-08-12B BB 40.9 2007-08-16C CC 40.9 2007-08-16D DD 40.8 1933-07-25E EE 40.7 2013-08-10F FF 40.6 1994-08-08G GG 40.6 1994-08-04H HH 40.5 2013-08-10I II 40.4 2007-08-16J JJ 40.3 2007-08-16C KK 40.3 1998-07-04L LL 40.3 1994-08-05A MM 40.2 2004-07-20H NN 40.2 2001-07-24O OO 40.2 1927-07-22P PP 40.1 1978-08-03A QQ 40 2007-08-16H RR 40 2001-07-24S SS 39.9 2013-08-11T TT 39.9 1997-07-05O UU 39.9 1994-08-08H VV 39.9 1990-07-19C WW 39.9 1978-08-03X XX 39.9 1942-08-02Create a program in python that will: ask a user to enter the date in the specified format(ex: "YYYY-MM-DD") catch an exception if the user provides the date in the wrong format and prints a custom message return what's a day of the week this date corresponds to (ex: Sunday) Test your program with multiple date and formats