Solution :
A substitution can do this for you. For a single line, you want to
replace all the leading or trailing whitespace with nothing. You
can do that with a pair of substitutions:
(i) To remove leading space
s/^\s+//;
(ii) To remove Trailing space
s/\s+$//;
A substitution can do this for you. For a single line, you want to
replace all the leading or trailing whitespace with nothing. You
can do that with a pair of substitutions:
(i) To remove leading space
s/^\s+//;
(ii) To remove Trailing space
s/\s+$//;
No comments:
Post a Comment