Re: compair files



Nikunj Khakhar wrote:

On Jun 19, 12:23 pm, "Joachim Schmitz" <nospam.j...@schmitz-
digital.de> wrote:

"Nikunj Khakhar" <nikunj.khak...@xxxxxxxxx> schrieb im Newsbeitragnews:1182222488.212572.276020@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> Hi Gurus ,


i have a standard file, which contain server name (solairs zones) ,
i want such script that , output of script should compair with the
standard file. if any missisng than give alert .

Inshort want to compair command output with the standard file using
script .

pl. give ideas/sample script ..

For text files 'diff' might be what you're looking for, for binary files try
'cmp'.

Bye, Jojo


Thanks jojo,

diff and cmp we have used , we wanted some idea on the advace
technique which we can apply on to our script like awk or sed , which
scan or ideal text file when execute the script and if it gives
different output than ideal text find (ie : string not found from the
text file ) than it echo some out put like "not found"

thanks in advance.

nikunj


The solution depends what your idea of a "difference" is. If the same lines appear in both files but in a different order are the files "different"? If the same values appear in both files, but one value appears twice in one file and only once in the other, are the files "different"? etc....

Ed.
.



Relevant Pages

  • Re: Shell output to Excel..
    ... Nikunj Khakhar wrote: ... tab-separated and each field cannot contain any tabs so all ... i am pasting sample o/p script is below i want date,time and volume ... to determine a date time pattern as qualifier. ...
    (comp.unix.shell)
  • Re: Shell output to Excel..
    ... Nikunj Khakhar wrote: ... tab-separated and each field cannot contain any tabs so all ... Thankx Ed, ... i am pasting sample o/p script is below i want date,time and volume ...
    (comp.unix.shell)
  • Re: Shell Script for the Disk monitor and Also send alert mail after Thresold
    ... Nikunj Khakhar wrote: ... with out you understanding how can you conclude .. ... script but i want to get alert mail ok ... So you have your script already? ...
    (comp.unix.shell)
  • Re: html report on shell script
    ... Nikunj Khakhar wrote... ... Chances are nobody but you get the error. ... Did you forget to chmod u+x before running your script? ...
    (comp.unix.shell)
  • Re: compair files
    ... i want such script that, output of script should compair with the ... if any missisng than give alert. ... For text files 'diff' might be what you're looking for, ...
    (comp.unix.shell)