我可以删除多个txt文件中的换行符(输入)吗?

时间:2019-06-17 02:01:54

标签: text line break

我有一个包含一些.txt文件的文件夹,我希望删除每个文件中的换行符(输入)。有可能吗?

文件夹树结构示例:

Action
   |--15minutes.txt
   |--2012.txt
   |--alien.txt
   |--alien3.txt
   |--......txt
Animation
   |--9.txt
   |--aladdin.txt
Family
   |--addamsfamilythe.txt
   |--big.txt
   |--t.t.txt
   |--happy.txt
   |--kungfupanda.txt

txt文件包含的示例:

ALADDIN:  THE COMPLETE SCRIPT

COMPILED BY BEN SCRIPPS 

(Portions Copyright (c) 1992 The Walt Disney Company

PEDDLER:    Oh I come from a land

    From a faraway place

    Where the caravan camels roam

    Where they cut off your ear /Where it's flat and immense

    If they don't like your face /And the heat is intense

    It's barbaric, but hey--it's home!

    When the wind's at your back

    And the sun's from the west

我想要得到什么:

ALADDIN:  THE COMPLETE SCRIPT COMPILED BY BEN SCRIPPS  (Portions Copyright (c) 1992 The Walt Disney Company PEDDLER:    Oh I come from a land     From a faraway place     Where the caravan camels roam     Where they cut off your ear /Where it's flat and immense     If they don't like your face /And the heat is intense     It's barbaric, but hey--it's home!     When the wind's at your back     And the sun's from the west

(仅1行)

谢谢你!

0 个答案:

没有答案