unix shell programm(need urgent Help)

Hi guys,
i am new to shell can u please explain how to get those two outputs
in temp1

i have i/p like

abcd 
edk
lkg 
jkl
loop

i need o/p

abcd *********
edk**********
lkg ***********
jkl ***********
loop************

need o/p

abcd 
***************
edk
***************
lkg 
***************
jkl
****************
loop
***************

can u please tell me script and please explain syntax also how its wrks

thanks in advance

% cat >testfile
abcd 
edk
lkg 
jkl
loop
app@kf3sv ~/tmp 
% sed -r 's/$/*****************/; s/^(.{14}).*$/\1/' testfile
abcd *********
edk***********
lkg **********
jkl***********
loop**********
app@kf3sv ~/tmp 
% sed -r 's/$/\n*****************/' testfile
abcd 
*****************
edk
*****************
lkg 
*****************
jkl
*****************
loop
*****************

And no, I couldn't explain better then in many web tutorials about sed.
And you really have spaces after "abcd" and "lkg" in your example.

tnx ..its working :slight_smile: