1.

Which of the following is performed by expr string handling’s function?(a) determine the length of string(b) extract a substring(c) locate the position of a character in a string(d) determine the length of string, extract and locate the position of the stringI have been asked this question in an interview for job.My doubt is from Case and Expr Command in section Essential Shell Programming of Unix

Answer»

Correct ANSWER is (d) DETERMINE the length of string, extract and locate the position of the string

To explain I would say: Though EXPR’s string handling features are not that elegant, bourne shell users HARDLY have any choice. For evaluating strings expr USES two expressions separated by a colon.



Discussion

No Comment Found

Related InterviewSolutions