1.What is the primary goal in using a scripting language for programming work?
Q: Write a shell script that outputs the names of each JavaScript file in the current directory that…
A: Get the list of javascript files from the current directory using ls. Run the loop for each file.…
Q: What is the difference between static and extern storage class? Given suitable examples in support…
A: STATIC: The purpose of ‘static’ is to keep a local variable in existence during life-time of program…
Q: 1. In indexed file allocation method, assuming that the block can only store 8 pointers as shown in…
A: File Allocation Methods: An allocation method is to tell how the disk blocks are allocated for a…
Q: Instructions ~/sa Write a recursive function, displayFiles, that expects a pathname as an argument.…
A: Python code for the Directory name: directory_path File name: file_path1 File name: file_path2
Q: 1. write a perl script to implement head command. a) The script should read the file name from…
A: The perl script is given by #save first arguement to f$f=$ARGV[0];#save number of arguements to…
Q: program that counts the number of files in a given directory. The directory should be specified as a…
A: /* C Program to count the Number of Lines in a Text File */ #include <stdio.h> #define…
Q: Python 3.8.5 Shell File Edit Shell Debug Options Window Help Python 3.8.5 (tags/v3.8.5:580fbb0, Jul…
A: In This Program You are importing a package with is Not installed. Firstly Run Command on the Shell…
Q: The program gcc is not actually the compiler, but a compilation driver program. That is to say, gcc…
A: 1. cpp gives .i files that are text files cc1 gives .s files that are text files gas gives .o files…
Q: Figure below shows the index allocation structure of the Unix Inode (File Control Block) where 15…
A: answer is given below
Q: What is the biggest size we can have for a file with SFS? (b)Provide data block numbers in sequence…
A: SFS ( Answering only for the first part) The Smart File System (SFS) is a journaling filesystem…
Q: 6. If the starting address location changes, in which of the following cases, the program has to be…
A: D compile time binding is the correct option Explanation:- Because compile time binding describe…
Q: File allocation method: LINKED LIST Total blocks: 32 File allocation start at block: 8 File…
A: As in the problem only "main" function was to be completed, it is assumed that the student has…
Q: How can I fix that Traceback (most recent call last): File "C:\Users\Richard…
A: the answer is given below:-
Q: Write a C program that gets a source file name from a user. If the file does not exist, it will…
A: Please give positive ratings for my efforts. Thanks. ALGORITHM get the source the source file…
Q: In python, rite a recursive function, displayFiles, that expects a pathname as an argument. The path…
A: Procedure Followed: Read a pathname and pass it as an argument to displayFiles recursive function.…
Q: Problem Write code that when executed in PowerShell, will satisfy the following requirements: •…
A: ANSWER:-
Q: Question: Suppose that you are implementing a program to write a string “সিএিই-110” in a binary…
A: The answer given as below:
Q: 1st: Write a shell script program (easterbunny.sh) which can create a circular letter for an Easter…
A: Solution # Hello World Program in Bash Shell echo "Enter the number" #asking for input read num…
Q: Given a binary file written using struct.pack() with the given format, return the number of bytes in…
A: Here is the solution to above problem. The chunk size is taken up to be 1024 Bytes or 1KB. In the…
Q: Answer the following questions.…
A: 1) Map files (source maps) are available for target code (css and JavaScript). And they are mainly…
Q: Write a shell script to read file name from user and write the given below commands in a series. -…
A: Script: #! /bin/bash # exit the shell script if an error is encountered somewhere in the middleset…
Q: Project 1-UNIX Shell Design a C program that copy the file "input.txt" to "out.txt" using Ubuntu…
A: Given: C program to copy contents of one file to another file.
Q: ite a python program to find the longest words in a text file for example: [general-purpose,…
A: Lets see the solution.
Q: Write a shell script that, given a file name as the argument will count the number of English…
A: Use three variables to store number of each article Iterate over the file Increment respective…
Q: UNIX please answer in sentences and examples - as brief as possible, concise - nothing more than one…
A: rmdir will just eliminate void catalogs while rm - r will eliminate registries and documents inside…
Q: at is the difference between static and external storage class? give suitable example in support of…
A: STATIC EXTERN Declared within a function Declared outside functions or blocks accessed only from…
Q: using c++: Write a class date (d, m, y), class file (name, size, creation_date) and class directory…
A: #include<iostream.h> #include<conio.h> class Date { public: int day,month,year;…
Q: Choose the correct answer after considering the following statements: I. A using namespace…
A: STATEMENT 1: A using namespace directive should never be in a .cpp file because that .cpp file could…
Q: using c++ and use pointer and char(don't use string): Write a class date (d, m, y), class file…
A: I have provided the code for Date ,File and Directory class as per the given requirement.
Q: Write a music market management system program in C++. Records in the library will be kept in 1 text…
A: ALGORITHM:- 1. Declare a data structure to store music details. 2. Define a function to take input…
Q: Write a shell program to perform the following task a. Display the present working directory. b.…
A: ANS:) Using the following program we can perform the tasks in the Unix shell. pwd command prints…
Q: Create a class with a static main that tests the ability to resolve and print a Path: • Create an…
A: Sorry for the inconvenience as for our rules we can answer only one question at a time please post…
Q: Question 5 a) how would you compile an assembly file listMyFiles.asm into an object file…
A: You can use gcc for these purposes a) To compile the asm code, use the following command gcc -c…
Q: The Problem: Read the name of a C file with full path, move it to a newly created folder named “c”…
A: Whenever you want to work with a file, the first step is to create a file. A file is nothing but…
Q: ähäi 15 The following problems can be solved by writing commands in the command window, or by…
A: As per the guidelines we are allowed to answer only the first question. - The question is to…
Q: Answer the following: Write the two static methods to create InetAddress objects. What is the…
A: The java.net.InetAddress class provides methods to get the IP address of any hostname. An instance…
Q: What is the correct order for converting the source code into an executable file? Answer Choices: a.…
A: The correct order is
Q: Why is it safer to remove a directory using “rmdir” than a recursive call to “rm”?
A: Ways to Delete a Directory on Unix: Unix is a simple and very straightforward operating system and…
Q: äbäi 15 The following problems can be solved by writing commands in the command window, or by…
A: Note: Answering the code in python as no language is mentioned. Input : Given two expressions.…
Q: 5. Assume a file system is using combined indexing scheme to keep track of the blocks allocated to a…
A: We have 10 direct pointers that each point directly to a 4K data block, so we can point to 10 * 4K =…
Q: Computer Science Write a C program that implements the producer and consumer problem
A: Hey there,I am writing the required solution for the above mentioned question below. Please do find…
Q: Q1. Suppose you have a file that is 5120 bytes long: Explain the reason for all the subquestions.…
A: Hey there, I am writing the required solution for the above mentioned question below in step 2. But…
Q: 4- Open a new COM file and assemble the following code: MOV CL, 19H BH, 3 CL, 5 BH RPT MOV RPT: ADD…
A: According to the information given:- we have to execute and fill the given table.
Q: Write a C program which takes four command line arguments: two file names and two number of…
A: #include <stdio.h> #include <stdlib.h> #include <string.h> #include…
Q: 2. Write a program in HACK assembly, without using symbols, that implements the described Feistel…
A: The Hack Assembly Language is minimal, it mainly consists of 3 types of instructions. It ignores…
Q: 2. In a C-like language, assume we have a struct (a record) like: struct myRecord { double joe;…
A: Аn аrrаy оf struсture in С рrоgrаmming is а соlleсtiоn оf different dаtаtyрe vаriаbles,…
1.What is the primary goal in using a scripting language for
1.Write a shell program that counts the number of files in a given directory. The
directory should be specified as a command line argument. The program does
not need to count files recursively in subdirectories; instead, it should not count subdirectories at all.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- (Mechanics) The deflection at any point along the centerline of a cantilevered beam, such as the one used for a balcony (see Figure 5.15), when a load is distributed evenly along the beam is given by this formula: d=wx224EI(x2+6l24lx) d is the deflection at location x (ft). xisthedistancefromthesecuredend( ft).wistheweightplacedattheendofthebeam( lbs/ft).listhebeamlength( ft). Eisthemodulesofelasticity( lbs/f t 2 ).Iisthesecondmomentofinertia( f t 4 ). For the beam shown in Figure 5.15, the second moment of inertia is determined as follows: l=bh312 b is the beam’s base. h is the beam’s height. Using these formulas, write, compile, and run a C++ program that determines and displays a table of the deflection for a cantilevered pine beam at half-foot increments along its length, using the following data: w=200lbs/ftl=3ftE=187.2106lb/ft2b=.2fth=.3ftSuppose you want to deposit a certain amount of money into a savings account with a fixed annual interest rate. We are interested in calculating the amount needed to deposit in order to have, for instance, $5000 in the account after three years. The initial deposit amount can be obtained using the following formula:Computer Science This is an introductory exercise to the manipulation of random variables with Python as a language for scientific computing and numerical computation. You have: f(x) = Ae-0.1x)° 4 x*, 0PYTHON (Uee While Loop) only Write a python program that calculates the populations of foxes and rabbits who live within a certain area of land, as that number changes from year to year. It will take the initial populations as inputs, and then proceed to calculate the year-by-year changes. The following is derived from the “Lotka-Volterra equations”, which you may look up if you desire. Essentially, we will model the foxes and rabbits with 4 constants, and 2 data structures of year-by-year values. They are defined as follows: r[y] # of rabbits in year y f[y] # of foxes in year y α or alpha - birth rate of rabbits β or beta - death rate of rabbits, dependent on # of foxes γ or gamma - birth rate of foxes, dependent on # of rabbits δ or delta - death rate of foxes, caused naturally The formulas we will use are: r[y]=r[y−1]+(r[y−1]×α)−(r[y−1]×f[y−1]×β)r[y]=r[y−1]+(r[y−1]×α)−(r[y−1]×f[y−1]×β) f[y]=f[y−1]+(f[y−1]×r[y−1]×γ)−(f[y−1]×δ)f[y]=f[y−1]+(f[y−1]×r[y−1]×γ)−(f[y−1]×δ) However,…[PYTHON LANGUAGE] You are planning an outing with some friends and need to calculate the total price of the tickets. A regular ticket usually costs $3.99 and a stu- dent ticket costs only $2.99. If the total number of tickets being ordered (including both students and regular tickets) is at least 10, then a 10% discount is applied to the order. However, if it is a holiday, then the at-least-ten group discount is only 5% (not 10%). Write a program that takes three lines of input: the number of reg- ular tickets, the number of student tickets, and an integer indicating whether it is a holiday (1) or not (0). It prints a float giving the total cost. Be sure to define and use constants for REGULAR TICKET PRICE and STUDENT TICKET PRICE. Write your program in a file named tickets.py.A-Write a program to compute the drag force F, (in Newton) When a body swims through fluid, the drag force is given by 1 F₁ =pV²ACD Take: p= 1000 kg/m3 is the density of fluid, V 1.25 (m/s) is the swimming speed, A=0.25 m² is the frontal area of the body, Cp=0.09 is the coefficient of drag. MatlapComputer Science Please help You went camping overnight but forgot to take with you a heater and need to make one using a dc battery of V0 and spare electrical wires of different lengths and resistivity. The battery has lead with the resistance of Rw. Please obtain the formula for the joule heat power and plot it as a function of RH ( in MATLAB) and in comparison to the resistance of the connecting leads, Rw. (Note: express RH = x Rw, where x is the effective ratio; vary x and plot Pmax vs. x). and Find the heating power if the heater is made out of superconducting metal. Will this heater work and why?! What is to happen on the molecular ( i.e. electron) level ?!Matlab A rocket is launched vertically and at t-0, the rocket's engine shuts down. At that time, the rocket has reached an altitude of ho- 500 m and is rising at a velocity of to 125 m/s. Gravity then takes over. The height of the rocket as a function of time is: h(t)-ho+vot-gt², t20 where g -9.81 m/s². The time t-0 marks the time the engine shuts off. After this time, the rocket continues to rise and reaches a maximum height of Amax meters at time t = tmax. Then, it begins to drop and reaches the ground at time t = tg. a. Create a vector for times from 0 to 30 seconds using an increment of 2 s. b. Use a for loop to compute h(t) for the time vector created in Part (a). e. Create a plot of the height versus time for the vectors defined in Part (a) and (b). Mark the and y axes of the plot using appropriate labels. d. Noting that the rocket reaches a maximum height, max, when the height function, h(t), attains a maxima, compute the time at which this occurs, max, and the maximum height,…Problem: Write a program for computing the amount of money in a bank account at the end of each quarter for a period of one year. A quarter is equivalent to 3 months. Assume that the account is created at the beginning of a year (i.e. January 1). The year will be entered at run time through the keyboard. The account has an initial principal that is entered at run time through the keyboard. No deposit or withdrawal is made within the one-year period. The interest is compounded quarterly which means that the interest earned for the first quarter will form part of the principal for the second quarter, the interest earned for the second quarter will form part of the principal for the third quarter and so on. The annual interest rate is 5%. The interest rate for a quarter is computed by dividing the annual interest rate by 4 since there are four quarters in a year. The computational procedure (see algorithm) and the output of the program (see sample run) are shown below. The output includes…Please use C Program In order to discourage excess electric consumption, an electrical company charges its customers a lower rate of P75 for the first 250 kilowatt-hours and a higher rate of P8.5 for each additional kilowatt-hour. In addition, a 10% surtax is added to the final bill. Write a program that calculates the electrical bill given the number of kilowatt-hours consumed as input. At the end, print the number of kilowatt-hours consumed and the computed bill.The great circle distance is the distance betweentwo points on the surface of a sphere. Let (x1, y1) and (x2, y2) be the geographicallatitude and longitude of two points. The great circle distance between the twopoints can be computed using the following formula:d = radius X arccos(sin (x1) X sin(x2) + cos(x1) X cos(x2) X cos(y1 - y2))Write a program that prompts the user to enter the latitude and longitude of twopoints on the earth in degrees and displays its great circle distance. The averageradius of the earth is 6,371.01 km. Note you need to convert the degrees into radiansusing the Math.toRadians method since the Java trigonometric methods useradians. The latitude and longitude degrees in the formula are for north and west.Use negative to indicate south and east degrees. Here is a sample run: Enter point 1 (latitude and longitude) in degrees: 39.55 −116.25 ↵EnterEnter point 2 (latitude and longitude) in degrees: 41.5 87.37 ↵EnterThe distance between the two points is…: Practical questiod 1. Write a C program for Arduino thar controls a set of two traffic lights A & B at a crossmadk. Assume that: When the traffic lighus (A) are green or amber, the traffic lights (B) are red. • When the traffic lights (B) are green or amber, the raffic lights (A) are red. Green lights must stay on for 15 seconds, amber lights for 5 seconds and red lights for 20 seconds. 2. Sketch the circuit diagram to wire the Arduina to the two traffic lights. O COr cone COn cone O csea csas ca R/W? RIW /N RIN N bits TOVO Mode ТОР OCRO COne 2:0 Set bits HGO Under Fast PWM 00 Normal immediate 00 K11 Normal operation, ocer disconnected 001 Phase Correct PWM on TOP OXFF Normal operation, OCcBA disconnected, 01 011 Clear Timer n Compee match ICTO 010 OCROA immediate aFF Ocen reserved OCBA toggles on Compare match, 011 Fast PWM exFF 01 111 ocon reserved 100 Reserved Clear OCex on Compare Match, Set OCex at ex0. inon-inverting mode) 10 101 Phase Correct PWM OCROA on TOP exee 110 Reserved…SEE MORE QUESTIONS