Jump to content

Calling all UNIX guys


Recommended Posts

Posted

[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 comp
do
grep $comp file2.txt >> matches_found.txt
done

something similar to above logic should work
[/quote]naku comp and diff teledu ela use cheyalo

  • Replies 38
  • Created
  • Last Reply

Top Posters In This Topic

  • ronitreddy

    15

  • Gachibowli_Diwakar

    11

  • lover

    8

  • PMREDDY19

    2

Popular Days

Top Posters In This Topic

Posted

[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 below

12345677rgnjvfnvjf in file1.txt
12345677rgnjvfnvjf 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..

Posted

[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

Posted

[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

Posted

[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.

Posted

[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..

Posted

[quote author=ronitreddy link=topic=214654.msg2636984#msg2636984 date=1311209021]

cmp compares byte by byte; diff compares line by line.
[/quote] thankyou thankyou

Posted

[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 ..

Posted

[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

Posted

[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 it


grep '[^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)

Posted

[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 it


grep '[^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

Thanks 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]

Posted

Thanks baa..But how can we make use of cat and how to map that with file2??

Posted

[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 case
fjhjmk1898989jhjd

oka sari extract chesi chudu .. sample file theeskuni

Posted

baa naku office access ledu ..i cant do it right now .. cry@fl repu office lo try chestha..procedure mundu telisthee better kada

×
×
  • Create New...