Jump to content

Calling all UNIX guys


Recommended Posts

Posted

Guys naku UNIX lo koncham dbts unnayi ..koncham help cheyandi plsss

1) How to test whether a shell script has been succeeded or not ?

2) I have 2 text files say file1.txt and file2.txt. file1.txt holds 10000 records. Some of the sample records for file1.txt were shown below

abc....123456789bert
gfd.....758457485hfdf
dfd.....638564658hfdf where 123456789,758457485, 638564658 are account numbers.

for file2.txt, some of the sample records were shown below:

hfdifdifjdkfjdkd7484737437hfhsdlfhdhfsd
yruerueuryeuyr874583783ureoiruueooeh
hkdfhkhfkhdfkk638564658klfldkflkdlkflkd where 7484737437,874583783, [b]638564658[/b] are account numbers

I need to find the common records that were present in file2.txt with respect to file1.txt..

3)How can we search for a file in a subdirectory ?
Say for example I need to list out all the files by the name 'AFDB' in the path /usr/forum/home/directory

CITI#H@ CITI#H@ CITI#H@ CITI#H@ CITI#H@ thankyou thankyou thankyou

  • 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

1. [url=http://www.cyberciti.biz/tips/debugging-shell-script.html]http://www.cyberciti.biz/tips/debugging-shell-script.html[/url] may helpful

Posted

[quote author=lover link=topic=214654.msg2636754#msg2636754 date=1311206921]
2 . diff -- help vadu ba
[/quote]

cut -c5-11 file1.txt>A
cut -c10-15 file2.txt>B chesthe account numbers osthayi baa..tarwathaaa em cheyali baa..

Posted

[quote author=lover link=topic=214654.msg2636762#msg2636762 date=1311207031]
1. [url=http://www.cyberciti.biz/tips/debugging-shell-script.html]http://www.cyberciti.biz/tips/debugging-shell-script.html[/url] may helpful
[/quote]

Thanks baa..but i cudnt find the answer  cry@fl cry@fl

Posted

[quote author=lover link=topic=214654.msg2636784#msg2636784 date=1311207373]
3 find / -name 'filename'

searches all root
[/quote]

thankyou thankyou CITI_$D# CITI_$D# you rock you rock

Posted

[quote author=ronitreddy link=topic=214654.msg2636785#msg2636785 date=1311207411]
Thanks baa..but i cudnt find the answer  cry@fl cry@fl
[/quote]may be silly but use vim editor
test for various inputs correct oo kado chodu china script aite works well and fine

Posted

[quote author=ronitreddy link=topic=214654.msg2636783#msg2636783 date=1311207352]
cut -c5-11 file1.txt>A
cut -c10-15 file2.txt>B chesthe account numbers osthayi baa..tarwathaaa em cheyali baa..
[/quote]sry comm --help vadi diff kadu

Posted

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

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] sCo_^Y inko dout similar ante line to line ahh leka line to each line ahh

Posted

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

Posted

[quote author=lover link=topic=214654.msg2636831#msg2636831 date=1311208051]
sCo_^Y inko dout similar ante line to line ahh leka line to each line ahh
[/quote]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

×
×
  • Create New...