What is the use of string function sub(regex,replacement,string)?



What is the use of string function sub(regex,replacement,string)?..

Answer / Arpita Gupta

The sub() function in AWK replaces the first occurrence of regex in a given string with replacement. It takes an additional argument for the input string.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Awk Interview Questions

What is the use of ARGIND?

1 Answers  


What are AWK Numerical Functions?

1 Answers  


What is NR in AWK?

1 Answers  


What is the use of numeric function sqrt ?

1 Answers  


What is the use of format specifier %s ?

1 Answers  


What is the use of FIELDWIDTHS?

1 Answers  


What is the use of numeric function int ?

1 Answers  


How to generate random numbers in AWK?

1 Answers  


What is the use of SUBSEP?

1 Answers  


What is the use of format specifier %d ?

1 Answers  


What is the use of format specifier %f ?

1 Answers  


What is the use of string function asorti(string,[d])?

1 Answers  


Categories