Company: Intuit_31_jan
Difficulty: medium
Problem Description In text-based instructions, arithmetic operations are often described with words mixed among numbers. This requires extracting the relevant data from the sentence to perform calculations. Write a Bash script to parse lines of text containing an arithmetic instruction. Each instruction includes an operator keyword ( sum , difference , multiply , or divide ) and exactly two integers ( num1 and num2 ). The script should: Identify the operator keyword and the two integers within the instruction string, ignoring all unrelated words and characters. Perform the specified calculation using the two integers in the order they appear. Print the result of the calculation. Input The standard input consists of multiple lines of text read until EOF. Each line contains: Exactly one operator keyword: sum , difference , multiply , or divide (case-sensitive). Exactly two non-negative integers. The first integer encountered in the line is num1 , and the second integer is num2 . Various