lover Posted July 21, 2011 Report Posted July 21, 2011 [quote author=Musugu_Veerudu link=topic=214654.msg2636845#msg2636845 date=1311208275]line in file1.txt ni anni lines in file2.txt tho compare cheyyaali ante .. cat file1.txt |while compdogrep $comp file2.txt >> matches_found.txtdonesomething similar to above logic should work[/quote]naku comp and diff teledu ela use cheyalo
ronitreddy Posted July 21, 2011 Author Report Posted July 21, 2011 [quote author=Musugu_Veerudu link=topic=214654.msg2636823#msg2636823 date=1311207946]ba .. oka doubt .. 1st file.. 2nd file lo konni records same untaaya ? when I say records line motham same untundha on both files like below12345677rgnjvfnvjf in file1.txt12345677rgnjvfnvjf in file2.txt[/quote]kadu baa..same undavu ..file1.txt lo hjfdkfkjd75478584fdsfds unte file2.txt lo jkfksdjfs75434bbbbbbbbb madyalo account number matrame same untundi ..confuse chesinanduku sorry baa..
ronitreddy Posted July 21, 2011 Author Report Posted July 21, 2011 [quote author=Musugu_Veerudu link=topic=214654.msg2636838#msg2636838 date=1311208170]for the 1st one .. script last lo echo statement pettey ba .. inka kadhu anukunte .. madhya loops lo konni echo statements pettuko .. telisipothundhi .. execute aindha ledha ani[/quote]We dont have a chance to modify the script baa..adi successful ga execute ayinda leda telsukovali
Gachibowli_Diwakar Posted July 21, 2011 Report Posted July 21, 2011 [quote author=ronitreddy link=topic=214654.msg2636922#msg2636922 date=1311208737]kadu baa..same undavu ..file1.txt lo hjfdkfkjd75478584fdsfds unte file2.txt lo jkfksdjfs75434bbbbbbbbb madyalo account number matrame same untundi ..confuse chesinanduku sorry baa..[/quote]ooh ok.. so account numbers file1.txt lo unnavi.. file2.txt lo unnavi niku kaavaali..anthe kadha ?[quote author=lover link=topic=214654.msg2636896#msg2636896 date=1311208666]naku comp and diff teledu ela use cheyalo [/quote]comp ante adhi variable ba ikkada .. loop authunnapudu.. value ni comp lo store cheskuntundi
ronitreddy Posted July 21, 2011 Author Report Posted July 21, 2011 [quote author=lover link=topic=214654.msg2636896#msg2636896 date=1311208666]naku comp and diff teledu ela use cheyalo[/quote]cmp compares byte by byte; diff compares line by line.
ronitreddy Posted July 21, 2011 Author Report Posted July 21, 2011 [quote author=Musugu_Veerudu link=topic=214654.msg2636964#msg2636964 date=1311208925]ooh ok.. so account numbers file1.txt lo unnavi.. file2.txt lo unnavi niku kaavaali..anthe kadha ?comp ante adhi variable ba ikkada .. loop authunnapudu.. value ni comp lo store cheskuntundi[/quote]avnu baa..aa account numbers same unna records naku kavali..oka 300 records same unnayi anuko out of 1000 records avi output lo ravali..
lover Posted July 21, 2011 Report Posted July 21, 2011 [quote author=ronitreddy link=topic=214654.msg2636984#msg2636984 date=1311209021]cmp compares byte by byte; diff compares line by line.[/quote] thankyou thankyou
Gachibowli_Diwakar Posted July 21, 2011 Report Posted July 21, 2011 [quote author=ronitreddy link=topic=214654.msg2637008#msg2637008 date=1311209136]avnu baa..aa account numbers same unna records naku kavali..oka 300 records same unnayi anuko out of 1000 records avi output lo ravali..[/quote]konchem complex ye ba.. awk vaadathaam ante.. text n numbers okate line lo unnaay kadha work out cheyyaali ba konchem ..for the 1st one..oka logfile lo padeyyochu kadha output ni .. aah output chuuskunte saripothundi ..
ronitreddy Posted July 21, 2011 Author Report Posted July 21, 2011 [quote author=Musugu_Veerudu link=topic=214654.msg2637070#msg2637070 date=1311209452]konchem complex ye ba.. awk vaadathaam ante.. text n numbers okate line lo unnaay kadha work out cheyyaali ba konchem ..for the 1st one..oka logfile lo padeyyochu kadha output ni .. aah output chuuskunte saripothundi ..[/quote]baa koncham help cheyi baa..1st one ki we dont have any log directories ..script undi..manam modify cheyodu..adi successful ga execute ayindo ledo cheppali cry@fl cry@fl
Gachibowli_Diwakar Posted July 21, 2011 Report Posted July 21, 2011 [quote author=ronitreddy link=topic=214654.msg2637102#msg2637102 date=1311209572]baa koncham help cheyi baa..1st one ki we dont have any log directories ..script undi..manam modify cheyodu..adi successful ga execute ayindo ledo cheppali cry@fl cry@fl[/quote]do this ba..1st only numbers ni extract cheyyataaniki chudu from file1.. u can do this to get itgrep '[^a-zA-Z] .. this will exclude letters from the file anta .. so use that with cat .. see below link[url=http://www.robelle.com/smugbook/regexpr.html]http://www.robelle.com/smugbook/regexpr.html[/url] .. last lo undhi chudu Text version kindha..how to exclude letters and numbers ani numbers oka file ki ragane.. aah numbers ni file2.txt tho map chesko.. telisipothundhi .. (if not grab the line number in filex.txt (lines number in filex.txt and file1.txt will be same if all the lines contains both text and numbers) that matches the account number in file2.txt)
ronitreddy Posted July 21, 2011 Author Report Posted July 21, 2011 [quote author=Musugu_Veerudu link=topic=214654.msg2637190#msg2637190 date=1311210238]do this ba..1st only numbers ni extract cheyyataaniki chudu from file1.. u can do this to get itgrep '[^a-zA-Z] .. this will exclude letters from the file anta .. so use that with cat .. see below link[url=http://www.robelle.com/smugbook/regexpr.html]http://www.robelle.com/smugbook/regexpr.html[/url] .. last lo undhi chudu Text version kindha..how to exclude letters and numbers aniThanks baa..But how can we make use of cat and how to map that with file2?? numbers oka file ki ragane.. aah numbers ni file2.txt tho map chesko.. telisipothundhi .. (if not grab the line number in filex.txt (lines number in filex.txt and file1.txt will be same if all the lines contains both text and numbers) that matches the account number in file2.txt)[/quote]
ronitreddy Posted July 21, 2011 Author Report Posted July 21, 2011 Thanks baa..But how can we make use of cat and how to map that with file2??
Gachibowli_Diwakar Posted July 21, 2011 Report Posted July 21, 2011 [quote author=ronitreddy link=topic=214654.msg2637232#msg2637232 date=1311210643][/quote]grep '[^a-zA-Z] .. dhaanni use chesi only numbers ni extract cheyyagaligaava from file1.txt ? I'm little concerned if this would work or not .. bcos ^ undhi kadha.. I doubt it would search at the starting of the line emo ani ... like this may not work for below casefjhjmk1898989jhjdoka sari extract chesi chudu .. sample file theeskuni
ronitreddy Posted July 21, 2011 Author Report Posted July 21, 2011 baa naku office access ledu ..i cant do it right now .. cry@fl repu office lo try chestha..procedure mundu telisthee better kada
Recommended Posts