i have a simple text file as input.i have to print that file in paragraph format.whenevr it finds "\n" in the input text it should start printing in next paragraph in output file.also a fixed amount of space should be given before start writing in every paragraph.
the input and output file format are attached below...
pls provide a unix ar perl script to do this...
avik1983 0 Newbie Poster
Recommended Answers
Jump to Postyou should try this.
perl -p -i.bak -e 's/\\n/\n\n /ig' good.txt
It edits the good.txt file and creates a
good.txt.bak
backup file. Remove the.bak
part in the above command and the backup file wont be created.
All 3 Replies
Mushy-pea 36 What, you can change this tag?
WolfPack 491 Posting Virtuoso Team Colleague
avik1983 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.