The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Concatenating the two lines in a file
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Concatenating the two lines in a file
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
5
(
permalink
)
06-27-2006
mbketan
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
mbketan
View Public Profile
Find all posts by mbketan
Find mbketan's past nominations received
Find mbketan's present nominations given