Question: what is gsub in shell script?
Answer: The gsub() function returns the number of substitutions made. If the variable to search and alter ( target ) is omitted, then the entire input record ( $0 ) is used. ... If string is a number, the length of the digit string representing that number is returned.