Question: How to check length of arguments in bash script ? For example: we have a script called lengthof.args that will display length of arguments, so
How to check length of arguments in bash script ?
For example: we have a script called "lengthof.args" that will display length of arguments, so when we call
lengthof.args '' should display 0
lengthof.args abc should display 3
lengthof.args ' 3x3 spaces ' should display 18 (including spaces)
Use while loop or for loop
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
