LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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: 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, 07:19 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,891

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Try -t
 
1 members found this post helpful.
Old 01-18-2013, 09: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 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


All times are GMT -5. The time now is 08:35 AM.

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 Google+: linuxquestions
Open Source Consulting | Domain Registration