Comparison of two files which contains strings using Shell scripting or PERL


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Comparison of two files which contains strings using Shell scripting or PERL
# 1  
Old 05-21-2009
Comparison of two files which contains strings using Shell scripting or PERL

Hi,
I need sample code to compare the two files line by line which contains text strings and to print the difference in the third file.

Thanks in advance
# 2  
Old 05-21-2009
Quote:
Originally Posted by sudhakaryadav
Hi,
I need sample code to compare the two files line by line which contains text strings and to print the difference in the third file.

Thanks in advance
check out diff, comm and even grep utilities..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Web Development

Perl scripting or shell scripting?

i am going to study any one of the scripting languages mentioned above(shell 0r perl scripting) . Which is having more scope for a fresher? (1 Reply)
Discussion started by: Anna Hussie
1 Replies

2. UNIX for Advanced & Expert Users

Comparison in Korn shell scripting

I have a scenario to implement in Korn shell script. Here it is.. I need to compare two values to see whether they are same or not. The issue is that the values coming in for comparison can be a string or an integer which can be determined during run time only. Which korn shell comparison... (2 Replies)
Discussion started by: vani123
2 Replies

3. What is on Your Mind?

Shell Scripting vs Perl scripting

Gents, I have been working in a Solaris/Unix environment for about 9 months. I took some linux classses online before getting the job. But, I am not very good at scripting. I want to learn how to script. Do you think that I should start with Shell scripting or Perl? I wanted to continue with... (2 Replies)
Discussion started by: Pouchie1
2 Replies

4. Shell Programming and Scripting

How to extract exact strings in shell scripting

/Path/snowbird9/nrfCompMgrRave1230100920.log.gz:09/20/2010 06:14:51 ERROR Error Message. /Path/snowbird6/nrfCompMgrRave1220100920.log.gz:09/20/2010 06:14:51 ERROR Error Message. /Path/snowbird14/nrfCompMgrRave920100920.log.gz:09/20/2010 06:14:51 ERROR Error Message.... (0 Replies)
Discussion started by: Shirisha
0 Replies

5. What is on Your Mind?

Shell scripting vs Perl scripting

Hi all, I would like to start developping some good scripting skills. Do you think it would be best to start with shell scripting or Perl? I already got a fundation, really basics, in perl. but I am wondering what would be best to be good at first. Can you please help me determine which one to... (14 Replies)
Discussion started by: Pouchie1
14 Replies

6. Shell Programming and Scripting

Call Shell scripting from Perl Scripting.

Hi How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Discussion started by: anupdas
2 Replies

7. Shell Programming and Scripting

Can we pass an array of strings from a Perl Program to a Shell Script?

Hi Folks, The subject is my question: Can we pass an array of strings from a Perl Program to a Shell Script? Please provide some sample code. Thanks ---------- Post updated at 11:52 PM ---------- Previous update was at 11:43 PM ---------- I got it. Its here:... (0 Replies)
Discussion started by: som.nitk
0 Replies

8. Shell Programming and Scripting

Help with perl scripting on strings

Hai, I have strings as follows. 0 INDEX MODE: ANALYZED (UNIQUE SCAN) OF 'SYS_C0030166' (INDEX (UNIQUE)) 1 INDEX MODE: ANALYZED (UNIQUE SCAN) OF 'SYS_C0029845' (INDEX (UNIQUE) 9 INDEX MODE: ANALYZED (RANGE SCAN) OF ... (2 Replies)
Discussion started by: sagarbsa
2 Replies

9. Shell Programming and Scripting

comparison of strings in unix shell scripting

Hi STORAGE_TYPE=$1 echo "########### SQL SESSION STARTED ###########" VALUE=`sqlplus -S /nolog << THEEND connect tcupro/tcupro_dev@bdd1optn SET SERVEROUTPUT ON DECLARE V_STORAGE_TYPE varchar2(3); V_ERR_MSG varchar2(255) ; V_LOG_LEVEL varchar2(200); BEGIN... (1 Reply)
Discussion started by: piscean_n
1 Replies

10. Shell Programming and Scripting

Comparison of 2 strings

I need some help with a script which accepts multiple rows of input (analysis from a virtual robot's testrun) from the standard in, and compares it as a whole with another file featuring erroneous data from a virtual robot's test run. What I want it to be able to do is slice off all the erroneous... (2 Replies)
Discussion started by: Retribution
2 Replies
Login or Register to Ask a Question