I want to count total no. of characters in a column. and if no. of charaters are more than 3 then it must replace it by splitted string. ie, it must place a space after 3 characters.
Ex:
21 435g asd3dd jklfjwe wer
column number 3 has 4 alphanumeric character, so it must be splitted like:
I am still in learning phase of linux.....
I have tried "length" command to count the characters of a string.
then I tried to use "cut" and "fold" commands but cant corelate them.
This is not my assignment task.....I need to learn this for other purpose. So, kindly help me out in this.
I noticed some inconsistencies in your requirement!
If you want to split each alpha-numeric string greater than 3 character length, then why the following highlighted 4 character length string is not considered?
21 435g asd 3dd jklfjwe wer
By the way if your requirement is to split strings that are greater than 4 character length, then try this code: