LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-16-2011, 06:49 PM   #1
aocferreira
Member
 
Registered: Feb 2011
Posts: 117

Rep: Reputation: 0
Editing text files with information from PostgreSQL DB


Hello,

Is there any way to edit text files with information in a database? The file is supposed to be always the same.. the information is going to be addedd in a specific format!
Thank you.
 
Old 05-16-2011, 11:28 PM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
You will have to give more information to get a meaningful answer.

"Is there any way to edit text files with information in a database?" Yes -- it doesn't matter where the information comes from, if it can be converted to text it can be edited into a text file.
 
Old 05-17-2011, 08:12 AM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
It sounds to me like the OP might be talking about some kind of template file, where he wants to replace macros/variables with values extracted from a relational database. If so, this is really two questions; firstly, about how to read from a PostgreSQL DB, and secondly about how to perform the replacements. Before attempting to give a more complete answer, I will wait for more information from aocferreira.
--- rod.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Editing Large Text Files. truculentknight Linux - Newbie 7 11-08-2009 11:24 PM
Text editing: Adding a digit/text to the end of a row CHARL0TTE Linux - Newbie 13 07-16-2009 06:44 AM
Editing/manipulating text files winchester169 Linux - Software 3 08-18-2005 06:01 PM
Editing text Files kool_kid Linux - Newbie 12 12-26-2004 11:21 PM
editing text files killertofu Linux - Newbie 2 10-15-2004 05:55 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:29 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration