Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Compare between two files with condition Post 303020973 by RudiC on Wednesday 1st of August 2018 10:47:21 AM
Old 08-01-2018
It matches what it is being offered in file1's lines' fields 1 - (NF-1). If you omit "Mobile" there, it won't be matched. The count of spaces is crucial here - it need to be the same in both files' patterns.

Last edited by RudiC; 08-01-2018 at 12:16 PM..
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to compare null and space using single if condition

Hi I have a input file with many fields and each filed will be with in double quotes(""). i want to check fields contains balnk,null or space using condition using if. when i write code as below for if condition its not working a=`awk -F ',' '{gsub("\"", "", $1);'NF==0';printf $1}'... (3 Replies)
Discussion started by: jayakumarrt
3 Replies

2. Shell Programming and Scripting

How to compare 2 files & get only few columns based on a condition related to both files?

Hiiiii friends I have 2 files which contains huge data & few lines of it are as shown below File1: b.dat(which has 21 columns) SSR 1976 8 12 13 10 44.00 39.0700 70.7800 7.0 0 0.00 0 2.78 0.00 0.00 0 0.00 2.78 0 NULL ISC 1976 8 12 22 32 37.39 36.2942 70.7338... (6 Replies)
Discussion started by: reva
6 Replies

3. Shell Programming and Scripting

Compare columns of 2 files based on condition defined in a different file

I have a control file which tells me which are the fields in the files I need to compare and based on the values I need to print the exact value if key =Y and output is Y , or if output is Y/N then I need to print only Y if it matches or N if it does not match and if output =N , then skip the feild... (7 Replies)
Discussion started by: newtoawk
7 Replies

4. Shell Programming and Scripting

compare 2 files and extract the data which is not present in other file with condition

I have 2 files whose data's are as follows : fileA 00 lieferungen 00 attractiop 01 done 02 forness 03 rasp 04 alwaysisng 04 funny 05 done1 fileB alwayssng dkhf fdgdfg dfgdg sdjkgkdfjg funny rasp (7 Replies)
Discussion started by: rajniman
7 Replies

5. Shell Programming and Scripting

Compare the two variable with if condition

Please help me with this: I need to compare two values in if condition in shell script but its goes always to else condition: TIME_CHECK=PM TIME-CLOCK=PM if ; then echo "You have access!" else echo "ACCESS DENIED!" fi (5 Replies)
Discussion started by: aroragaurav.84
5 Replies

6. Shell Programming and Scripting

How to compare 2 file with Condition.

Hello, I need to run a command or shell script that will compare 2 file with Condition. Can you please help ? thank you. File 1. ############start@linda22 ... ################## aaaaaaa bbbbbbb cccccc dddddd eeeee 11111 ############start@linda23 ... ################## aaaaaaa... (2 Replies)
Discussion started by: ooilinlove
2 Replies

7. Shell Programming and Scripting

compare 2 files and return unique lines in each file (based on condition)

hi my problem is little complicated one. i have 2 files which appear like this file 1 abbsss:aa:22:34:as akl abc 1234 mkilll:as:ss:23:qs asc abc 0987 mlopii:cd:wq:24:as asd abc 7866 file2 lkoaa:as:24:32:sa alk abc 3245 lkmo:as:34:43:qs qsa abc 0987 kloia:ds:45:56:sa acq abc 7805 i... (5 Replies)
Discussion started by: anurupa777
5 Replies

8. Shell Programming and Scripting

IF condition to compare file prefix

I have files with naming as below, testS123, testS223, testB1, testC1, testD1 I need to write a if condition to print 'Hello' when the file prefix is not testS* else 'Good bye'. if then echo "Hello" else echo "Good bye" fi; (1 Reply)
Discussion started by: r@v!7*7@
1 Replies

9. UNIX for Beginners Questions & Answers

Compare two files with awk and condition

I am preparing a script to check the configuration of the db2 against the standard configuration. I am fetching the output in file A and want to compare it with the standard output written in file B. File A Diagnostic error capture level (DIAGLEVEL) = 3 Audit buffer size (4KB) (AUDIT_BUF_SZ)... (2 Replies)
Discussion started by: bashb
2 Replies
rtradvd.conf(4) 					     Kernel Interfaces Manual						   rtradvd.conf(4)

NAME
rtradvd.conf - configuration file for router advertisement daemon DESCRIPTION
This file describes the information used by rtradvd(1M) when constructing IPv6 router advertisement packets for a specific interface as specified by RFC 2461 ("Neighbor Discovery for IP Version 6"). This file is read by at initialization time or upon reception of signal configuration consists of two general statements and one substatement that is used only by the statement. All statements and substatements must end with a semicolon. Statements are composed of keywords separated by white space, which can be any combination of blanks and tabs. The user may create an entry for each interface that is to be enabled for Router Advertisements. Any configuration information not speci- fied in the individual or entry is inherited from the statement. In absence of a statement or specific keywords, the values of options are set according to their default values as defined in RFC-2461. The statement can be used to define global values for both and keywords. The statement is defined as: defaults { # list of interface specific keyword-value pairs; # list of prefixinfo specific keyword-value pairs; }; The statement is defined as: interface interface-name { # list of interface specific keyword-value pairs; prefixinfo prefix/prefixlen { # list of prefixinfo specific keyword-value pairs; }; }; The specifies the "prefix" and "prefix length" to be advertised on that interface. The and specific keywords (if specified) have a precedence over the keywords defined in the statement. Comments begin with the pound character (#) and continue to the end of the line. INTERFACE SPECIFIC OPTIONS
The following basic keywords and values are defined in RFC 2461: Enables or disables sending of periodic Router Advertisements and responding to Router Solicitations. DEFAULT: off Specifies the maximum time, in seconds, between sending unsolicited multicast Router Advertisements from the interface. Valid values are between 4 and 1800 seconds, inclusive. When using Mobile IPv6 extension, the minimum valid value allowed drops to 0.07. DEFAULT: 600 Specifies the minimum time, in seconds, between sending unsolicited multicast Router Advertisements from the interface. Valid values are between 3 seconds and .75 * inclusive. The default is 200 seconds. When using Mobile IPv6 extension, the minimum valid value allowed drops to 0.03. DEFAULT: 0.33 * Enables or disables the setting of the "Managed Address Configuration" flag in Router Advertisements. DEFAULT: off Enables or disables the setting of the "Other Stateful Configuration" flag in Router Advertisements. DEFAULT: off Specifies the value to be placed in MTU option sent by the router. A value of zero means unspecified. When set to 0, does not include the MTU option in Router Advertisements. It can not be greater than the maximum allowed MTU for a specific interface. DEFAULT: 0 Specifies a time, in milliseconds,that is placed in the Reachable Time field in Router Advertisement messages. Valid values are between 0 and 3,600,000 (1 hour), inclusive. A value of zero means unspecified by this router. DEFAULT: 0 Specifies a time, in milliseconds, that is placed in the Retrans Timer field in Router Advertisement messages. A value of zero means unspecified by this router. DEFAULT: 0 Specifies the value to be placed in the Cur Hop Limit field in Router Advertisement messages sent by the router. A value of zero means unspecified by this router. DEFAULT: 64 Specifies a time, in seconds, that is placed in the Router Lifetime field in Router Advertisement messages. Valid values are 0 or between and 9000, inclusive. A value of zero indicates that the router is not to be used as a default router and should not appear in the default router list of the host receiving this Router Advertisement message. DEFAULT: 3 * Enables or disables the sending of the interface link-layer address option in outgoing Router Advertisement messages. DEFAULT: on Mobile IPv6 option. Enables or disables setting of the "Home Agent" flag field in Router Advertisement messages. When enabled, this indicates that the router sending this Router Advertisement messages is also functioning as a Mobile IPv6 home agent on this link. When enabled, the minimum values specified by Mobile IPv6 extension can be used for and DEFAULT: off Mobile IPv6 option. Specifies the length of time in seconds that the router is offering Mobile IPv6 Home Agent service. The maximum value is 65520 sec- onds (18.2 hours). A value of zero is not allowed. DEFAULT: Mobile IPv6 option. Specifies a preference level for the home agent sending this Router Advertisement. Higher values indicate a home agent is more preferable. If both the and are set to their default values, the Home Agent Information option will not be included in Router Advertisement messages sent by this Home Agent router. DEFAULT: 0 Mobile IPv6 option. Enables or disable the sending of Advertisement Interval Option in Router Advertisement messages. If this option is included in the message, the minimum limits specified by Mobile IPv6 extension for and can be used. DEFAULT: off PREFIX SPECIFIC OPTIONS
The following address prefix keywords and values are defined in RFC 2461: Specifies the valid lifetime of the address prefix, in seconds, to be placed in outgoing Router Advertisement messages. The symbolic name represents infinity. DEFAULT: 2592000 seconds (30 days) Specifies the preferred lifetime of the address prefix, in seconds, to be placed in outgoing Router Advertisement messages. The symbolic name represents infinity. DEFAULT: 604800 seconds (7 days) Sets or clears the On-link flag field in the Prefix Information option. DEFAULT: on Sets or clears the Autonomous Flag field in the Prefix Information option. DEFAULT: on Mobile IPv6 prefix option. Sets or clear the Router Flag field in the Prefix Information option. This indicates that the Prefix field, in addition to adver- tising the indicated prefix, contains a complete IP address assigned to the sending router. DEFAULT: off EXAMPLES
Three example configuration files are shown below for a system that has two interfaces. In these examples, the daemon will use default values defined in RFC-2461 for those keywords that are not specified in the configuration file. The second example uses statement to define some global keywords for the both interfaces and prefixes. Finally, the last example shows a Mobile IPv6 example. Example 1 interface lan1 { AdvCurHopLimit 32; AdvSendAdvertisement on; prefixinfo 2008:0:0:4::/64 { AdvValidLifetime 70100; AdvPreferredLifetime 50200; }; prefixinfo 2008:0:0:5::/64 { AdvValidLifetime 70100; AdvPreferredLifetime 50200; }; }; interface lan2 { AdvCurHopLimit 32; AdvRouterLifetime 0; AdvSendAdvertisement on; prefixinfo 2008:0:0:6::/64 { AdvValidLifetime 70100; AdvPreferredLifetime 50200; }; }; Example 1 specifies that the daemon should send Router Advertisement messages on both and must be (the default is The is set to 32 for both interfaces (default value is 64). The for the second interface is set to 0. It means the receiving hosts should not add this router in their list of "IPv6 default router". Example 2 defaults { AdvCurHopLimit 32; AdvSendAdvertisement on; AdvValidLifetime 70100; AdvPreferredLifetime 50200; }; interface lan1 { prefixinfo 2008:0:0:4::/64 { }; prefixinfo 2008:0:0:5::/64 { }; }; interface lan2 { AdvRouterLifetime 0; prefixinfo 2008:0:0:6::/64 { }; }; Same as Example 1 but using statement. Example 3 defaults { AdvSendAdvertisement on; MinRtrAdvInterval 2; MaxRtrAdvInterval 5; AdvHomeAgentFlag on; AdvHomeAgentLifetime 1200; AdvHomeAgentPreference 3; AdvIntervalOpt on; }; interface lan1 { prefixinfo 2008:0:0:4::/64 { }; prefixinfo 2008::5:210:83ff:fef7:7a9d/64 { AdvRouterAddress on; }; }; interface lan2 { prefixinfo 2008:0:0:6::9/64 { AdvRouterAddress on; AdvPreferredLifetime 18000; }; }; In this example, the Mobile IPv6 options will be included in the Router Advertisement messages. is turned to also advertise the global address of the router on and If the kernel part of Mobile IPv6 product is detected (see mip6mod(7)), the node also acts as "Home Agent" for the two prefixes configured with set on and In this case, the daemon enables processing of the four new ICMPv6 messages defined by Mobile IPv6 (see rtradvd(1M)). SEE ALSO
ndp(1M), rtradvd(1M), mip6mod(7), ndp(7P). 1. T. Narten, E. Nordmark, W. Simpson, RFC2461 , December 1998. 2. S. Thompson, T. Narten, RFC2462 , December 1998. 3. D. Johnson, C. Perkins, IETF document. rtradvd.conf(4)
All times are GMT -4. The time now is 10:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy