将 Diff 与 -y 一起使用以获得并排输出

将 Diff 与 -y 一起使用以获得并排输出

我试图使用diffwith-y来获得并排输出,但在大约 18 行后我的输出变得混乱。这是一个例子,有什么线索吗? (检查自*.java_pool_size=134217728):

*._unnest_subquery=FALSE                    *._unnest_subquery=FALSE
*.archive_lag_target=1800                   *.archive_lag_target=1800
*.audit_file_dest='/u01/app/oracle/admin/xxxxxxx/adump'       <
*.audit_sys_operations=TRUE                 *.audit_sys_operations=TRUE
*.audit_trail='DB_EXTENDED'                 *.audit_trail='DB_EXTENDED'
*.compatible='11.2.0.1.0'                   *.compatible='11.2.0.1.0'
*.control_files='/u01/app/oracle/oradata/xxxxxxx/control01.ct | *.control_files='/u01/app/oracle/oradata/xxxxxxx/control01.ct
*.cursor_sharing='EXACT'                      | *.cursor_sharing='SIMILAR'
                                  > *.cursor_space_for_time=TRUE
*.db_block_size=8192                        *.db_block_size=8192
*.db_domain='xxxxxxxxxx.com'                      | *.db_domain=''
*.db_file_multiblock_read_count=8                 | *.db_file_multiblock_read_count=32
*.db_name='xxxxxxx'                     *.db_name='xxxxxxx'
*.db_writer_processes=8                     *.db_writer_processes=8
*.diagnostic_dest='/u01/app/oracle'             *.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=xxxxxxxXDB)'     *.dispatchers='(PROTOCOL=TCP) (SERVICE=xxxxxxxXDB)'
                                  > *.EVENT='1652 TRACE NAME ERRORSTACK LEVEL 3'
*.fast_start_mttr_target=300                    *.fast_start_mttr_target=300
*.java_pool_size=134217728                    | *.instance_name='xxxxxx'
*.job_queue_processes=10                      | *.log_archive_dest_1='LOCATION=/xxxxxxx-05/oradata/arch'
*.large_pool_size=167772160                   | *.log_archive_dest_state_1='enable'
*.log_archive_dest_1='LOCATION=/xxxxxxx-04/oradata/arch'      <
*.log_archive_format='arch_%t_%s_%r.arc'            *.log_archive_format='arch_%t_%s_%r.arc'
*.log_checkpoint_timeout=0                    | *.log_buffer=1048576
*.log_checkpoint_to_alert=TRUE                    | *.log_checkpoint_interval=0
*.log_buffer=14289920                         | *.log_checkpoints_to_alert=TRUE
*.open_cursors=4000                       | *.open_cursors=1500
*.parallel_adaptive_multi_user=FALSE                  | *.optimizer_features_enable='10.2.0.4'
*.pga_aggregate_target=2500M                      | *.optimizer_mode='ALL_ROWS'
*.processes=3000                          | *.pga_aggregate_target=527433728
*.query_rewrite_integrity='TRUSTED'               | *.processes=800
                                  > *.query_rewrite_enabled='TRUE'
                                  > *.query_rewrite_integrity='Trusted'
*.recyclebin='OFF'                      *.recyclebin='OFF'
*.remote_login_passwordfile='EXCLUSIVE'             *.remote_login_passwordfile='EXCLUSIVE'
*.sec_case_sensitive_logon=FALSE                  | *.SEC_CASE_SENSITIVE_LOGON=FALSE
*.session_cached_cursors=1000                     | *.session_cached_cursors=1200
*.session_max_open_files=30                   | *.session_max_open_files=20
*.sga_target=4G                           | *.sessions=2000
*.standby_file_management='AUTO'                  | *.sga_max_size=2600M
                                  > *.sga_target=2600M
                                  > *.sort_area_size=524288
                                  > *.star_transformation_enabled='FALSE'
*.streams_pool_size=50331648                    *.streams_pool_size=50331648
                                  > *.timed_statistics=TRUE
*.undo_management='AUTO'                    *.undo_management='AUTO'
*.undo_retention=18000                        | *.undo_retention=21600
*.undo_tablespace='UNDOTBS1'                    *.undo_tablespace='UNDOTBS1'

答案1

您的文件差异很大,足以混淆 diff 的前瞻和匹配算法,例如缺少“s”检查站log_checkpoint_to_alert将防止以下块被占用:

...
*.log_archive_format='arch_%t_%s_%r.arc'        *.log_archive_format='arch_%t_%s_%r.arc'
*.log_checkpoint_timeout=0                    | *.log_buffer=1048576
*.log_checkpoint_to_alert=TRUE                    | *.log_checkpoint_interval=0
*.log_buffer=14289920                         | *.log_checkpoints_to_alert=TRUE
*.open_cursors=4000                       | *.open_cursors=1500
...

您是否考虑过使用类似的扩散或者梅尔德,因为他们在匹配中提供替代和/或手动干预?

答案2

由于换行而变得混乱

避免这种情况:使用-W开关来强制列的宽度

   -W columns
     --width=columns
        Use an output width of columns in side by side format.

相关内容