bash - diff command + how to use + how to interpret results -
file1
$ cat datatable-code-export-serverside/index.php <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>how export jquery datatable data pdf,excel,csv , copy</title> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/r/dt/jq-2.1.4,jszip-2.5.0,pdfmake-0.1.18,dt-1.10.9,af-2.0.0,b-1.0.3,b-colvis-1.0.3,b-html5-1.0.3,b-print-1.0.3,se-1.0.1/datatables.min.css"/> <script type="text/javascript" src="https://cdn.datatables.net/r/dt/jq-2.1.4,jszip-2.5.0,pdfmake-0.1.18,dt-1.10.9,af-2.0.0,b-1.0.3,b-colvis-1.0.3,b-html5-1.0.3,b-print-1.0.3,se-1.0.1/datatables.min.js"></script> <div class="container" style="padding:20px;20px;"> <div class=""> <h1>data table export features using php server-side</h1> <div class=""> <table id="employee_grid" class="display" width="100%" cellspacing="0"> <thead> <tr> <th>empid</th> <th>name</th> <th>salary</th> <th>age</th> </tr> </thead> <tfoot> <tr> <th>empid</th> <th>name</th> <th>salary</th> <th>age</th> </tr> </tfoot> </table> </div> </div> </div> <script type="text/javascript"> $( document ).ready(function() { $('#employee_grid').datatable({ "processing": true, "sajaxsource":"response.php", "dom": 'lbfrtip', "buttons": [ { extend: 'collection', text: 'export', buttons: [ 'copy', 'excel', 'csv', 'pdf', 'print' ] } ] }); }); </script>
file2:
$ cat datatable-code-serverside/index.php <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>datatable mysql</title> <link rel="stylesheet" id="font-awesome-style-css" href="http://phpflow.com/code/css/bootstrap3.min.css" type="text/css" media="all"> <script type="text/javascript" charset="utf8" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.11.1.min.js"></script> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.9/css/jquery.datatables.min.css"/> <script type="text/javascript" src="https://cdn.datatables.net/1.10.9/js/jquery.datatables.min.js"></script> <div class="container"> <div class=""> <h1>data table</h1> <div class=""> <table id="employee_grid" class="display" width="100%" cellspacing="0"> <thead> <tr> <th>empid</th> <th>name</th> <th>salary</th> <th>age</th> </tr> </thead> <tfoot> <tr> <th>empid</th> <th>name</th> <th>salary</th> <th>age</th> </tr> </tfoot> </table> </div> </div> </div> <script type="text/javascript"> $( document ).ready(function() { $('#employee_grid').datatable({ "bprocessing": true, "serverside": true, "ajax":{ url :"response.php", // json datasource type: "post", // type of method ,get/post/delete error: function(){ $("#employee_grid_processing").css("display","none"); } } }); }); </script>
using diff command:
$ diff datatable-code-export-serverside/index.php datatable-code-serverside/index.php 5,8c5,11 < <title>how export jquery datatable data pdf,excel,csv , copy</title> < <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/r/dt/jq-2.1.4,jszip-2.5.0,pdfmake-0.1.18,dt-1.10.9,af-2.0.0,b-1.0.3,b-colvis-1.0.3,b-html5-1.0.3,b-print-1.0.3,se-1.0.1/datatables.min.css"/> < < <script type="text/javascript" src="https://cdn.datatables.net/r/dt/jq-2.1.4,jszip-2.5.0,pdfmake-0.1.18,dt-1.10.9,af-2.0.0,b-1.0.3,b-colvis-1.0.3,b-html5-1.0.3,b-print-1.0.3,se-1.0.1/datatables.min.js"></script> --- > <title>datatable mysql</title> > <link rel="stylesheet" id="font-awesome-style-css" href="http://phpflow.com/code/css/bootstrap3.min.css" type="text/css" media="all"> > <script type="text/javascript" charset="utf8" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.11.1.min.js"></script> > > <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.9/css/jquery.datatables.min.css"/> > > <script type="text/javascript" src="https://cdn.datatables.net/1.10.9/js/jquery.datatables.min.js"></script> 11c14 < <div class="container" style="padding:20px;20px;"> --- > <div class="container"> 13c16 < <h1>data table export features using php server-side</h1> --- > <h1>data table</h1> 20c23 < <th>salary</th> --- > <th>salary</th> 29c32 < <th>salary</th> --- > <th>salary</th> 43,56c46,52 < "processing": true, < "sajaxsource":"response.php", < "dom": 'lbfrtip', < "buttons": [ < { < extend: 'collection', < text: 'export', < buttons: [ < 'copy', < 'excel', < 'csv', < 'pdf', < 'print' < ] --- > "bprocessing": true, > "serverside": true, > "ajax":{ > url :"response.php", // json datasource > type: "post", // type of method ,get/post/delete > error: function(){ > $("#employee_grid_processing").css("display","none"); 58,59c54,55 < ] < }); --- > } > });
for example, 5,8c5,11
mean. or can advise how use it. have read documentation still find difficult. can offer general advice?
these change commands (to edit files) can convert 1 other.
the normal output format consists of 1 or more hunks of differences; each hunk shows 1 area files differ. normal format hunks this:
change-command < from-file-line < from-file-line… --- > to-file-line > to-file-line…
see info diff detailed explanation of these commands.
Comments
Post a Comment