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
lesya [120]
3 years ago
10

Make a program that prints each line of its input that mentions fred. (It shouldn’t do anything for other lines of input.) Does

it match if your input string is Fred, frederick, or Alfred? Make a small text file with a few lines mentioning "fred flintstone" and his friends, then use that file as input to this program and the ones later in this section.
Computers and Technology
1 answer:
Vitek1552 [10]3 years ago
8 0

Answer:

See Explaination

Explanation:

This assume that input is a file and is given on command line. Please note this will ot print lines with frederick as thats what I feel question is asking for

#!/usr/bin/perl -w

open(FILE, $ARGV[0]) or die("Could not open the file $ARGV[0]");

while ($line = <FILE>){

if($line=~/\s+fred\s+/)

{

print $line;

}

}

close(FILE);

You might be interested in
Ead the following scenario and then answer the question.
Evgen [1.6K]
The answer is D. hard drive
4 0
3 years ago
Anyone who do bug bounty hunt ?​
lutik1710 [3]

Answer:

Hlo .yes,i have done bug bounty hunt.

5 0
3 years ago
I need a free flashdrive can anyone tell me any website links so i can get one for free????​
olga55 [171]

Answer:

wish

Explanation:

look for one that is free

4 0
3 years ago
Write 4 types of viruses , explain them briefly.
wariber [46]

I can help with two.

Web Scripting Virus, A sneaky virus that targets popular websites. What this virus does is overwrite code on a website and insert links that can install malicious software on your device. Web scripting viruses can steal your cookies and use the information to post on your behalf on the infected website.

FILE INFECTOR, targeting executable files (.exe), file infector viruses slow down programs and damage system files when a user runs them.

8 0
2 years ago
What happens if part of an ftp message is not delivered to the destination?
Oliga [24]

The message is lost when an FTP message is not delivered to its destination because FTP doesn't use a reliable delivery method.

<h3>What is FTP?</h3>

FTP is an abbreviation for file transfer protocol and it can be defined as a type of server that's designed and developed to store and provide files for download, as well as sharing between two or more users on an active computer network.

Generally, the message is lost when an FTP message is not delivered to its destination because FTP doesn't use a reliable delivery method.

Read more on FTP here: brainly.com/question/20602197

#SPJ12

4 0
2 years ago
Other questions:
  • The n modifier after the tilde forces the index variable to expand only to the ______
    15·1 answer
  • To save and store data separate from a computer, it helps to have an
    15·2 answers
  • Chunking is a good strategy for completing large assignments because it makes the work
    7·2 answers
  • During the weekend, Alice often needs to access files stored on her office desktop from her home laptop. Last week, she installe
    15·1 answer
  • A class is a _____, which encapsulates _____ and _____. (Points : 2) programming language construct; attributes; behavior
    7·1 answer
  • Write an expression that computes the integer average of the int variables exam1 and exam2 (both declared and assigned values).
    15·1 answer
  • 7. Which cipher is based on the clues of the physical factors, rather than the hardware or a software cryptosystem
    8·1 answer
  • Please what do you guys think about this ?
    10·2 answers
  • List six features of the Microsoft ​
    10·1 answer
  • _____ refers to the programs that a device can run.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!