Sponsored Content
Full Discussion: Compare difference
Top Forums Shell Programming and Scripting Compare difference Post 302296699 by ssshen on Wednesday 11th of March 2009 04:52:46 PM
Old 03-11-2009
mine is ox10
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to compare the difference between a file and a folder??

Hi, I have a .txt file which has to be compared with a folder and print the difference to some other .txt file. I did try with the diff command..i mean diff /tmp/aaa/bbb.txt /space/aaa/bbb/ /***bbb.txt contains all the files names which may or may not exist in the folder bbb..so i need... (2 Replies)
Discussion started by: kumarsaravana_s
2 Replies

2. Shell Programming and Scripting

to compare two files and to print the difference

suppose one file P1168S P2150L P85L Q597R R1097C Another file P2150L P85L Q597R R1097C R1379C R1587K Then output shud be R1379C R1587K thanks (5 Replies)
Discussion started by: cdfd123
5 Replies

3. UNIX for Dummies Questions & Answers

Compare Files and Output Difference

I have to compare two files for any differences, then output the lab and question number for any differences. This is what I currently have: diff lab2.txt lab2answer.txt > lab2compare.txt Though the output doesn't have to be sent to a .txt (or any sort of log), I found that easier, at least... (2 Replies)
Discussion started by: Joesgrrrl
2 Replies

4. Shell Programming and Scripting

compare the log and display the time difference..

Hi All, I've written a script which reads all the systems backup information and saves it in a log file. #!/bin/ksh export ORACLE_SID=$1 export primaryhost=$2 export sid=`echo $ORACLE_SID| tr ` RESULTFILE=/oracle/PC9/backupstatus_prod.log LOGP=`ssh -o StrictHostKeyChecking=no -l... (1 Reply)
Discussion started by: suri.tyson
1 Replies

5. Shell Programming and Scripting

Compare two files and print the two lines with difference

I have two files like this: #FILE 1 ABCD 4322 26485 JMTJ 5311 97248 XMPJ 4321 58978 #FILE 2 ABCD 4321 26485 JMTJ 5311 97248 XMPJ 4321 68978 What to do: Compare the two files and find those lines that doesn't match. And have a new file like this: #FILE 3 "from file 1" ABCD 4322 26485... (11 Replies)
Discussion started by: kingpeejay
11 Replies

6. UNIX for Dummies Questions & Answers

compare / difference between sub-sections of files

Hi there, I'm sure this question has been asked many times but I can't find any posts with information. How can I check the differences between say lines 20 - 200 in file1 and lines 420 - 600 in file2? Thanks in advance for any help! js (2 Replies)
Discussion started by: js8765
2 Replies

7. Shell Programming and Scripting

compare multiple files and get the difference

Hi all, i have 50 files .data should be same in these 50 files , so my task is to find the difference. i need a logic , which finds difference between all files and print in output file with file name where it found that difference . i tried below logic , but its not giving me what i want. let... (2 Replies)
Discussion started by: deepakiniimt
2 Replies

8. Shell Programming and Scripting

Compare line and printing difference

Hi, I want to compare two files and print out their differences e.g: t1.txt a,b,c,d t2.txt a,b,c,d,e,f Output e,f Currently I do this long about way tr ',' '\n' <t1.txt >t1.tmp tr ',' '\n' <t2.txt >t2.tmp diff t1.tmp t2.tmp > t12.tmp I have to this comparison for 100 files, so... (3 Replies)
Discussion started by: wahi80
3 Replies

9. Shell Programming and Scripting

Compare two variables and print the difference

Hi PRIM_SEQ=`some sql code` and output of PRIM_SEQ is like below 120 130 STB_SEQ=`some sql code` and output of STB_SEQ is like below 115 110 i need to compare this two variables output ( decimal numbers) 1) What I want to do is to compare every number in the PRIM_SEQ with... (8 Replies)
Discussion started by: amar1208
8 Replies

10. UNIX for Beginners Questions & Answers

Compare two variables and print the difference

compare two variables and print the difference i have two variables X1=rac1,rac2 Y1=rac2,rac3 output=rac1,rac3 Use code tags to wrap code fragments or data samples. (1 Reply)
Discussion started by: jhonnyrip
1 Replies
Object::Pluggable::Pipeline(3pm)			User Contributed Perl Documentation			  Object::Pluggable::Pipeline(3pm)

NAME
Object::Pluggable::Pipeline - The plugin pipeline for Object::Pluggable. SYNOPSIS
use Object::Pluggable; use Object::Pluggable::Pipeline; use My::Plugin; my $self = Object::Pluggable->new(); # the following operations are presented in pairs # the first is the general procedure, the second is # the specific way using the pipeline directly # to install a plugin $self->plugin_add(mine => My::Plugin->new); $self->pipeline->push(mine => My::Plugin->new); # to remove a plugin $self->plugin_del('mine'); # or the object $self->pipeline->remove('mine'); # or the object # to get a plugin my $plug = $self->plugin_get('mine'); my $plug = $self->pipeline->get('mine'); # there are other very specific operations that # the pipeline offers, demonstrated here: # to get the pipeline object itself my $pipe = $self->pipeline; # to install a plugin at the front of the pipeline $pipe->unshift(mine => My::Plugin->new); # to remove the plugin at the end of the pipeline my $plug = $pipe->pop; # to remove the plugin at the front of the pipeline my $plug = $pipe->shift; # to replace a plugin with another $pipe->replace(mine => newmine => My::Plugin->new); # to insert a plugin before another $pipe->insert_before(mine => newmine => My::Plugin->new); # to insert a plugin after another $pipe->insert_after(mine => newmine => My::Plugin->new); # to get the location in the pipeline of a plugin my $index = $pipe->get_index('mine'); # to move a plugin closer to the front of the pipeline $pipe->bump_up('mine'); # to move a plugin closer to the end of the pipeline $pipe->bump_down('mine'); DESCRIPTION
Object::Pluggable::Pipeline defines the Plugin pipeline system for Object::Pluggable instances. METHODS
"new" Takes one argument, the Object::Pluggable object to attach to. "push" Takes at least two arguments, an alias for a plugin and the plugin object itself. Any extra arguments will be passed to the register method of the plugin object. If a plugin with that alias already exists, $@ will be set and "undef" will be returned. Otherwise, it adds the plugin to the end of the pipeline and registers it. This will yield a "plugin_add" event. If successful, it returns the size of the pipeline. my $new_size = $pipe->push($name, $plug, @register_args); "unshift" Takes at least two arguments, an alias for a plugin and the plugin object itself. Any extra arguments will be passed to the register method of the plugin object. If a plugin with that alias already exists, $@ will be set and "undef" will be returned. Otherwise, it adds the plugin to the beginning of the pipeline and registers it. This will yield a "plugin_add" event. If successful, it returns the size of the pipeline. my $new_size = $pipe->push($name, $plug, @register_args); "shift" Takes any number of arguments. The first plugin in the pipeline is removed. Any arguments will be passed to the unregister method of the plugin object. This will yield a "plugin_del" event. In list context, it returns the plugin and its alias; in scalar context, it returns only the plugin. If there were no elements, an empty list or "undef" will be returned. my ($plug, $name) = $pipe->shift(@unregister_args); my $plug = $pipe->shift(@unregister_args); "pop" Takes any number of arguments. The last plugin in the pipeline is removed. Any arguments will be passed to the unregister method of the plugin object. This will yield an "plugin_del" event. In list context, it returns the plugin and its alias; in scalar context, it returns only the plugin. If there were no elements, an empty list or "undef" will be returned. my ($plug, $name) = $pipe->pop(@unregister_args); my $plug = $pipe->pop(@unregister_args); "replace" Takes at least three arguments, the old plugin or its alias, an alias for the new plugin and the new plugin object itself. You can optionally pass two array references of arguments which will be delivered to the unregister method of the old plugin and the register method of the new plugin, respectively. If you only want to pass the latter, you can put "undef" in place of the former. If the old plugin doesn't exist, or if there is already a plugin with the new alias (besides the old plugin), $@ will be set and "undef" will be returned. Otherwise, it removes the old plugin (yielding an "plugin_del" event) and replaces it with the new plugin. This will yield an "plugin_add" event. If successful, it returns 1. my $success = $pipe->replace($name, $new_name, $new_plug, @unregister_args, @register_args); my $success = $pipe->replace($plug, $new_name, $new_plug, @unregister_args, @register_args); "insert_before" Takes at least three arguments, the plugin that is relative to the operation, an alias for the new plugin and the new plugin object itself. Any extra arguments will be passed to the register method of the new plugin object. If the first plugin doesn't exist, or if there is already a plugin with the new alias, $@ will be set and "undef" will be returned. Otherwise, the new plugin is placed just prior to the other plugin in the pipeline. If successful, it returns 1. my $success = $pipe->insert_before($name, $new_name, $new_plug, @register_args); my $success = $pipe->insert_before($plug, $new_name, $new_plug, @register_args); "insert_after" Takes at least three arguments, the plugin that is relative to the operation, an alias for the new plugin and the new plugin object itself. any extra arguments will be passed to the register method of the new plugin object. If the first plugin doesn't exist, or if there is already a plugin with the new alias, $@ will be set and "undef" will be returned. Otherwise, the new plugin is placed just after to the other plugin in the pipeline. If successful, it returns 1. my $success = $pipe->insert_after($name, $new_name, $new_plug, @register_args); my $success = $pipe->insert_after($plug, $new_name, $new_plug, @register_args); "bump_up" Takes one or two arguments, the plugin or its alias, and the distance to bump the plugin. The distance defaults to 1. If the plugin doesn't exist, $@ will be set and -1 will be returned, not undef. Otherwise, the plugin will be moved the given distance closer to the front of the pipeline. A warning is issued alerting you if it would have been moved past the beginning of the pipeline, and the plugin is placed at the beginning. If successful, the new index of the plugin in the pipeline is returned. my $pos = $pipe->bump_up($name); my $pos = $pipe->bump_up($plug); my $pos = $pipe->bump_up($name, $delta); my $pos = $pipe->bump_up($plug, $delta); "bump_down" Takes one or two arguments, the plugin or its alias, and the distance to bump the plugin. The distance defaults to 1. If the plugin doesn't exist, $@ will be set and -1 will be returned, not "undef". Otherwise, the plugin will be moved the given distance closer to the end of the pipeline. A warning is issued alerting you if it would have been moved past the end of the pipeline, and the plugin is placed at the end. If successful, the new index of the plugin in the pipeline is returned. my $pos = $pipe->bump_down($name); my $pos = $pipe->bump_down($plug); my $pos = $pipe->bump_down($name, $delta); my $pos = $pipe->bump_down($plug, $delta); "remove" Takes at least one argument, a plugin or its alias. Any arguments will be passed to the unregister method of the plugin object. If the plugin doesn't exist, $@ will be set and "undef" will be returned. Otherwise, the plugin is removed from the pipeline. This will yield an "plugin_del" event. In list context, it returns the plugin and its alias; in scalar context, it returns only the plugin. my ($plug, $name) = $pipe->remove($the_name, @unregister_args); my ($plug, $name) = $pipe->remove($the_plug, @unregister_args); my $plug = $pipe->remove($the_name, @unregister_args); my $plug = $pipe->remove($the_plug, @unregister_args); "get" Takes one argument, a plugin or its alias. If no such plugin exists, $@ will be set and "undef" will be returned. In list context, it returns the plugin and its alias; in scalar context, it returns only the plugin. my ($plug, $name) = $pipe->get($the_name); my ($plug, $name) = $pipe->get($the_plug); my $plug = $pipe->get($the_name); my $plug = $pipe->get($the_plug); "get_index" Takes one argument, a plugin or its alias. If no such plugin exists, $@ will be set and -1 will be returned, not "undef". Otherwise, the index in the pipeline is returned. my $pos = $pipe->get_index($name); my $pos = $pipe->get_index($plug); BUGS
None known so far. AUTHOR
Jeff "japhy" Pinyan, japhy@perlmonk.org. MAINTAINER
Chris "BinGOs" Williams, chris@bingosnet.co.uk. SEE ALSO
Object::Pluggable. POE::Component::IRC, perl v5.10.1 2010-10-09 Object::Pluggable::Pipeline(3pm)
All times are GMT -4. The time now is 01:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy