The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 06-27-2006
mbketan mbketan is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 9
Concatenate it

Another solution :

for i in `cat tt`
do
if [ `echo $i | cut -c1-1 ` = "," ]
then
prevline="$prevline$i"
else
echo $prevline
prevline=$i
fi
done
echo $prevline