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
nalin [4]
4 years ago
14

Write a Bash script that searches all .c files in the current directory (and its subdirectories, recursively) for occurrences of

the word "foobar". Your search should be case-sensitive (that applies both to filenames and the word "foobar"). Note that an occurrence of "foobar" only counts as a word if it is either at the beginning of the line or preceded by a non-word-constituent character, or, similarly, if it is either at the end of the line or followed by a non-word- constituent character. Word-constituent characters are letters, digits and underscores.
Computers and Technology
1 answer:
Aloiza [94]4 years ago
5 0

Answer:

grep -R  '^foobar'.c > variable && grep -R  'foobar$'.c >> variable

echo $variable | ls -n .

Explanation:

Bash scripting is a language used in unix and linux operating systems to interact and automate processes and manage files and packages in the system. It is an open source scripting language that has locations for several commands like echo, ls, man etc, and globbing characters.

The above statement stores and appends data of a search pattern to an already existing local variable and list them numerically as standard out 'STDOUT'.

You might be interested in
Explain what a honeypot is. In your explanation, give at least one advantage and one disadvantage of deploying a honeypot on a c
tatuchka [14]

Answer:

A honeypot is a computer network set up to act as a decoy to track, deflect, or research trying to obtain unwanted access to the information system.

Explanation:

A honeypot is a device or device network designed to imitate possible cyber-attack targets. It can be utilized to detect or deflect assaults from a legitimate military target. It may also be used to collect knowledge on how cybercrime works.

<u>Advantage:- </u>

  • Data Value:- One of the challenges faced by the research community is to obtain meaning from big data. Companies hold large quantities of data daily including firewall logs, device logs, and warnings for vulnerability scanning.
  • Resources:- The problem facing most protection systems is resource shortages or even the depletion of resources. Power saturation is when a protection asset can no longer work since it is overloaded by its assets.
  • Simplicity :- I find simplicity to be the biggest single strength of honeypots. No flashy techniques are to be created, no stamp computer systems to be managed, no rule units to be misconfigured.

<u>Disadvantage:-  </u>

That honeypot doesn't replace any safety mechanisms; they just operate with your overall security infrastructure and improve it.

4 0
4 years ago
PLEASE HURRY!!<br> Look at the image below
djverab [1.8K]

Answer:

The function usernameMaker.

Explanation:

strFirst is a local variable in the function usernameMaker since it is an argument that is passed into that function. This means that the scope of strFirst is the function usernameMaker, since it cannot be accessed anywhere else in the code.

Hope this helps :)

8 0
3 years ago
What’s the difference between a stream and a tab?
Elza [17]

Answer:

Option (D) is the correct option to the following question.

Explanation:

Because a tab is labeled the stream i.e., dashboard, tab is the former representation of user profile in their social media account and streams displays only the different forms of one user profile. They also are the conversations, timeline, and post of any users' profile.

6 0
4 years ago
All the concrete classes in the java collections framework implement _____________. the cloneable interface the comparable inter
liubo4ka [24]
Since java.util.PriorityQueue doesn't use the Cloneable interface, I think it's safe to say that Serializable interfaces are implemented in all instances.
8 0
3 years ago
Which of the following best describes the relationship between if/else and switch statements :
kvasek [131]
I want to say ‘A’ since if/else and switch statements are both conditional statements.
7 0
3 years ago
Other questions:
  • What is the main idea of this article? Please someone help me. I will give brainliest answer
    7·1 answer
  • The economist George gilder argued that
    6·1 answer
  • Which of the following is a benefit, as well as a risk, associated with peer-to-peer networks?
    11·2 answers
  • If the mine winch drum diameter is 6M, how far will the counterweight lift for each single rotation of the drum
    11·1 answer
  • A news report says that company XYZ network was attacked by outsiders, who apparently sent a lot of spoofed ARP requests/respons
    15·1 answer
  • Which of the following is not a characteristic of a motorcycle?
    6·1 answer
  • QUIZLET Packet ________ is a form of protection for your computer that looks at each packet that comes into your computer networ
    7·1 answer
  • Why does Microsoft release new versions of its Windows operating system every few years?
    9·2 answers
  • g You are looking to rob a jewelry store. You have been staking it out for a couple of weeks now and have learned the weights an
    10·1 answer
  • . An operating system is: *
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!