comparing two files yy.unl and xx.dat
Jerry McAllister
jerrymc at clunix.cl.msu.edu
Thu Dec 9 12:51:45 PST 2004
>
> Hi all
>
> I am new to shell scripts. I have a doubt. Please somebody help me.
>
> Any explanation with example will be appreciated.
>
> I try to compare 2 files xx.dat (data separated by comma) and yy.unl
> (data separated by |).
>
> And if a record in xx.dat is not found in yy.unl then move that record
> to some database table like db2 table.
Well, I would be inclined to write a small Perl script for that.
If they both had the same separators there might be an easier way.
Of course, I suppose it would be easy to convert the commas to bars
or viceversa with sed and then work on it. But Perl is so easy it would
be my choice.
////jerry
>
>
>
> Thanks
>
>
>
> Jemima
>
>
>
>
>
More information about the freebsd-questions
mailing list