LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 05:33 PM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Rep: Reputation: 83
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, 08:19 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,142

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
Try -t
 
1 members found this post helpful.
Old 01-18-2013, 10:23 AM   #3
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
That did the trick. Thanks, man.
 
  


Reply

Tags
bash, psql, query


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Kingston 8GB data traveller g2 Formatting problem mkhan919 Linux - Newbie 1 10-25-2010 11:53 AM
Data recovery after formatting ext3 partition Jerblue Linux - Newbie 6 07-14-2009 01:53 PM
LXer: Independent Data and Formatting with Microformats LXer Syndicated Linux News 0 07-12-2006 05:21 AM
how to save disk formatting data insigniya Linux - General 3 03-27-2006 08:33 AM


All times are GMT -5. The time now is 01:32 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration