Monday 15 August 2011

unix - AIX Shell Script - Formatting a long line of 255 Characters into a 10 line paragraph -


I will run my problem on a multi-line paragraph script at 5.3 5.3

And will read the VARCHAR2 type from the Oracle table column field.

I want to divide it

I have tried and so far, I have acquired the ability to divide itself into SQL queries using multiple SUBSTR calls , But it resolves the problem of not being divided into two lines, and so it is expected to see that it can be solved in the shell script.

For example, if there is an input variable

  Life is not about the discovery of things that can be found, it tells about unexpected and Finding the things for which you have never searched Sometimes, the best way to move forward in life is to accept that you have enough   

output should be

  Life is not about searching for those things It can be found that it is unexpected and finding the things you have never searched for. Sometimes, the best way to move forward in life is to accept that you have enough   

Appreciate if someone can guide me, can it be achieved through CAD or AGC? or something else.

How about it?

  echo "Life is not about finding things that can be found, it is about unexpected events, and you have never searched for things to discover, Sometimes, the best way to move forward in life is that you are adequate. FMT-Y 30   

Result:

  Life is not about the search of things that can be found, it tells about being unexpected and those Finding the things for which you have never searched Sometimes, the best way to move forward in life is to accept that you have enough    

No comments:

Post a Comment