LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 05-18-2003, 01:58 PM   #1
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,611

Rep: Reputation: 60
Application to place single space with % between each line


Hello!
I have an odd question:
Is there an application that will take a text file with MANY (1000+) single line entries (quotes) and place a single blank line between each entry, and a % on that blank line?

For example (shortened):
Hello there
Hi
Well Hello
Yup

Would look like this:
Hello there
%
Hi
%
Well Hello
%
Yup

?
I am under the impression this is the format I need to add a file of quotes to fortune. If I am wrong, then how would I go about getting my 1000+ line quote file to be picked by fortune?

Thanks
 
Old 05-18-2003, 02:06 PM   #2
Manish
Member
 
Registered: Feb 2002
Distribution: Debian / Debian-based
Posts: 58

Rep: Reputation: 15
try this:

Code:
awk '{ print; print "%"; }' myfile > output
 
Old 05-18-2003, 02:16 PM   #3
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,611

Original Poster
Rep: Reputation: 60
Worked great! Thank you very much

Cool
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
notify user space application from the kernel space lordofring Linux - Software 2 06-22-2009 01:32 PM
CFdisk Space Ends Up In Wrong Place Thanatos Linux - General 2 09-04-2005 10:42 AM
Creating Single Instance linux application praj_linux Programming 2 11-19-2004 05:06 AM
Place to discuss getting more HD space? jago25_98 Linux - Hardware 1 11-06-2004 09:12 PM
Printing is not possible for a single application using Samba and Cups SKH Linux - Software 0 01-29-2004 09:09 AM


All times are GMT -5. The time now is 05:28 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration