LinuxQuestions.org
Help answer threads with 0 replies.
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 01-17-2013, 04:33 PM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
psql - skip all formatting and spit just the data I'm asking for


Hi!

I'm creating a bash script and I want to get a single value from a single table in the DB... no formatting, no column name, no nothing, just the value of that column I'm asking for (single row in the table).

-q does remove a lot of stuff but I still get the column name, "-------------", and the number of rows in the result.

Thanks in advance.
 
Old 01-17-2013, 07:19 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Try -t
 
1 members found this post helpful.
Old 01-18-2013, 09:23 AM   #3
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092

Original Poster
Blog Entries: 1

Rep: Reputation: 90
That did the trick. Thanks, man.
 
  


Reply

Tags
bash, psql, query



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
Kingston 8GB data traveller g2 Formatting problem mkhan919 Linux - Newbie 1 10-25-2010 10:53 AM
Data recovery after formatting ext3 partition Jerblue Linux - Newbie 6 07-14-2009 12:53 PM
LXer: Independent Data and Formatting with Microformats LXer Syndicated Linux News 0 07-12-2006 04:21 AM
how to save disk formatting data insigniya Linux - General 3 03-27-2006 07:33 AM

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

All times are GMT -5. The time now is 05:55 AM.

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