Search Results

Search: Posts Made By: felino
808
Posted By RudiC
Or bash: while read L1; do read L2; echo $L1...
Or bash:
while read L1; do read L2; echo $L1 $L2; done < file
line-01 line-02
line-03 line-04
808
Posted By Scrutinizer
Or can it be paste? paste - - < file ...
Or can it be paste?
paste - - < file



--
Note: \t in the replacement part of the "s" command is GNU sed only. For regular sed use actual TAB characters (CTRL-V TAB).
808
Posted By RudiC
Welcome to the forum. Does it HAVE to be sed...
Welcome to the forum.

Does it HAVE to be sed or bash?
awk 'ORS=NR%2?"\t":"\n"' file
line-01 line-02
line-03 line-04


OK, sed is possible, and simple, too:
sed 'N; s/\n/\t/' file...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 06:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy