1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
viktelen [127]
3 years ago
10

Write a program that reads a file containing text. Read each line and send it to the output file, preceded by line numbers. If t

he input file is Mary had a little lamb Whose Fleece was a white as snow. And everywhere that Mary went, The lamb was sure to go! then the program produces the output file /* 1 */ Mary had a little lamb /* 2 */ Whose Fleece was a white as snow. /* 3 */ And everywhere that Mary went, /* 4 */ The lamb was sure to go! The line numbers are enclosed in /* */ delimiters so the program can be used for numbering Java source files. Prompt the user for the input and output file names.
Computers and Technology
1 answer:
Zina [86]3 years ago
4 0

#!/bin/bash

INPUT_FILE=$1

count=1

while IFS= read -r line; do

echo $count - $line

count=$(($count + 1))

done < $INPUT_FILE

You might be interested in
Ninety-two percent of the new information was stored on magnetic media, mostly in _____.
kiruha [24]

Answer:

The answer to the following question is the option "b".

Explanation:

In the computer system, Hard disks stand for the hard disk drive. It is also known as a hard disk. It locates inside the computer case. The hard disk drive is used to store an electromechanical data. That uses magnetic storage device that store and retrieve data. So the answer to this question is hard disks.

5 0
4 years ago
What is the google search operator that limits results to a specific domain?
IrinaK [193]

Answer:

 Google search operator is also known as advanced operator which extend the various capabilities of the regular type of text searches. It basically contain various types of special characters and the commands.

Google search operator are very useful in the various technical and the content searches. This type of search operator also limits the result in the sites which are indexed with a specific domain and URL (User resource locator). The google search basically allow to use various symbols that are based on the operator.  

7 0
3 years ago
Which of the following is a domestic business activity?
harkovskaia [24]
What are the options?

7 0
3 years ago
Read 2 more answers
Consider the following four 2-dimensional data points: (2, 2), (4, 4), (1, 5) and (5, 1). We can make use of the KL-Transform to
trasher [3.6K]

Answer:

pootis

Explanation:

4 0
4 years ago
JavaScript is the same thing as Java?
Mila [183]

Not really, because Java is an OOP programming language and JavaScript is an OOP scripting language.

Hope I helped!

~Mshcmindy

5 0
3 years ago
Read 2 more answers
Other questions:
  • Write a program that assigns two integer values from standard input to the variables int1 and int2, then prints "true" if they a
    10·1 answer
  • Marty uses a customized database to sort parts and track inventory. The customized database is an example of _____.
    15·1 answer
  • Face book requires you to change your password regularly<br> a. TRUE<br> b. FALSE
    14·1 answer
  • What features are provided by most GUIs?
    7·1 answer
  • Which of these is NOT a mathematical operator used in Python?
    12·1 answer
  • How tp access to all tools in ms word
    10·1 answer
  • Dynamic addressing: __________.
    12·2 answers
  • Create a query that shows columns employee last name, job title and hire date for those employees who joined the company on or a
    7·1 answer
  • You have just received a generic-looking email that is addressed as coming from the administrator of your company. The email say
    8·1 answer
  • Addition substraction and multiplication are examples of the set of _____ provided by the int data type
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!