1.

Which of the following pattern is used for extracting a substring using expr?(a) /( )(b) \(. .\)(c) . .\)(d) \\(I have been asked this question in quiz.My question comes from Case and Expr Command topic in chapter Essential Shell Programming of Unix

Answer»

Right OPTION is (B) \(. .\)

To elaborate: expr can extract a substring enclosed by the escaped characters \ ( and \). For example, to extract ‘03’ from the string 2003 USE the following command:



Discussion

No Comment Found

Related InterviewSolutions