Not gettting target output using this

i=1
out="_"
while [ $i -le 5 ]
do
j=0
IN=""
 while [ $j -lt $i ]
 do
  IN="|"$IN
   j=`expr $j + 1`
  done
print -n $IN$out
 i=`expr $i + 1`
done

Actual O/P:

|_||_|||_||||_|||||_

Expected O/P:
|_
| |_
| | |_
| | | |_
| | | | |_
Rgds,
TS

Problem sorted out it should be echo in place of print !!

Add echo before your last line ( done )

What do you expect? Option -n to print suppresses new line chars (assuming ksh shell).

Haha... I was hoping to see him ask why the echo...