On 28-Jul-2001 azharmg wrote:
> hi..good day,
> 
> how to filter the fields from table that we wish to dump it..
> ie.table : abc fields:name,address,phone..
> 
> so we only want dump for field name and address only,...
> how to do that..
> 

Start with this:

localhost.dread$ cat csvdmp

#!/bin/sh

if [ $# -eq "2" ]
then
        mysqldump -t $1 $2 | grep INSERT | \
          sed 's/^INSERT .* VALUES (//g' | \
          sed 's/);//g'
        exit $?
fi

me=`basename $0`
echo usage: $me database table 
exit 2

---
and from there on ...
     man cut awk

Regards,
-- 
Don Read                                       [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.
                            (53kr33t w0rdz: sql table query)

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to