I think you should put that in a bash script... read the file, then iterate per line, do the cut and insert into mysql.
On Fri, Jul 4, 2014 at 5:06 PM, Zahid Adeel <[email protected]> wrote: > Hi everyone, i need some help regarding CUT command. > > I want to pipe the output variables of cut command to mysql client to > update those strings in mysql db. > I want to do something like this. > > cat files_list | cut -d' ' -f1,3 | mysql -uroot -proot -e "insert into > table(var1,var2) values($f1,$f2)" > > How can i do this ... kindly help me out ..!! > Thanks. > > -- > -- > You received this message because you are subscribed to the Linux Users > Group. > To post a message, send email to [email protected] > To unsubscribe, send email to [email protected] > For more options, visit our group at > http://groups.google.com/group/linuxusersgroup > References can be found at: http://goo.gl/anqri > Please remember to abide by our list rules (http://tinyurl.com/LUG-Rules > or http://cdn.fsdev.net/List-Rules.pdf) > > --- > You received this message because you are subscribed to the Google Groups > "Linux Users Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- -- Romar Micabalo (aka 'hardwyrd') SysAdmin / Consultant / Linux & FOSS Evangelist http://www.about.me/rmr.micabalo ------------------------------------------------------------- "Penguin, penguin, and more penguin !" -- -- You received this message because you are subscribed to the Linux Users Group. To post a message, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit our group at http://groups.google.com/group/linuxusersgroup References can be found at: http://goo.gl/anqri Please remember to abide by our list rules (http://tinyurl.com/LUG-Rules or http://cdn.fsdev.net/List-Rules.pdf) --- You received this message because you are subscribed to the Google Groups "Linux Users Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
