Search
 
 

Display results as :
 


Rechercher Advanced Search

Top posting users this month

GeoMap

Replace return in sed (用sed删除回车、换行)

Go down

Replace return in sed (用sed删除回车、换行)

Post  halala on Tue Dec 04, 2012 11:16 am

sed -e ':beg; $!{N; b beg}; s/\n/ /g;' test.txt

or

sed -e ':beg; $!{N; b beg}; y/\n/ /;' test.txt'

or

cat test.txt | tr '\n' ' '
avatar
halala

帖子数 : 99
金币(Coin) : 2580
注册日期 : 2012-08-17

View user profile

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum