Take the spurious quotes out of the middle of the echo, and put the second line of output in a second echo. That should produce the output you need.
You'll need to clarify what you mean by "Each record created in Unix should be of 80 byte length" as nothing in your question implies you are creating anything at all...
This is what i am looking for ... i have a shellscript whcih creates a report. Report has got 5 rows and each row should start from byte 1 and end at byte 80 . This should follow for the remainign 5 rows ..... hope this explains .....
As Ken has already shown, you can do this with echo easily enough.
(It might require a -e flag or setting IFS depending on your implementation of echo, but it works with neither on /usr/bin/echo for Solaris 9)
wc -c will list the number of characters (in your situation that works for bytes too).
Integer maths in shell can be done using expr (eg `expr 80 - /usr/bin/echo "${myoutput}\c" | wc -c`)
You can generate a string of X bytes using echo and a for-do loop.
Let us know which parts of the solution remain a problem for you and we can elaborate as required.
But really, that's pretty convoluted when printf does the job out of the box. Just for my own curiosity, why do you need to use echo?
It makes me wonder; Is this a homework question? If so we can still help but you need to move this thread (ask a moderator) and fill out the homework question template.
Come to think of it, I fully concur with you Neo.
I think I should not have given the full answer.
Wth out the printf typeset is the only alternative.
And I think that is what they were looking for the students to come up with.