relpipe-data/examples.xml
branchv_0
changeset 186 e33f13c91289
parent 185 6cd2e54d90ea
child 187 c952261978e8
equal deleted inserted replaced
185:6cd2e54d90ea 186:e33f13c91289
   119  │ /etc/ssh/ssh_host_rsa_key.pub     │
   119  │ /etc/ssh/ssh_host_rsa_key.pub     │
   120  ╰───────────────────────────────────╯
   120  ╰───────────────────────────────────╯
   121 Record count: 9]]></pre>
   121 Record count: 9]]></pre>
   122 		
   122 		
   123 		
   123 		
       
   124 		<h3>relpipe-in-fstab</h3>
       
   125 		
       
   126 		<p>
       
   127 			Using command <code>relpipe-in-fstab</code> we can convert the <code>/etc/fstab</code> or <code>/etc/mtab</code> to relational data 
       
   128 		</p>
       
   129 		
       
   130 		<m:pre jazyk="bash"><![CDATA[relpipe-in-fstab | relpipe-out-tabular]]></m:pre>
       
   131 		
       
   132 		<p>
       
   133 			and see them as a nice table:
       
   134 		</p>
       
   135 		
       
   136 		<pre><![CDATA[fstab:
       
   137  ╭─────────────────┬──────────────────────────────────────┬──────────────────────┬───────────────┬───────────────────────────────────────┬────────────────┬────────────────╮
       
   138  │ scheme (string) │ device                      (string) │ mount_point (string) │ type (string) │ options                      (string) │ dump (integer) │ pass (integer) │
       
   139  ├─────────────────┼──────────────────────────────────────┼──────────────────────┼───────────────┼───────────────────────────────────────┼────────────────┼────────────────┤
       
   140  │ UUID            │ 29758270-fd25-4a6c-a7bb-9a18302816af │ /                    │ ext4          │ relatime,user_xattr,errors=remount-ro │              0 │              1 │
       
   141  │                 │ /dev/sr0                             │ /media/cdrom0        │ udf,iso9660   │ user,noauto                           │              0 │              0 │
       
   142  │                 │ /dev/sde                             │ /mnt/data            │ ext4          │ relatime,user_xattr,errors=remount-ro │              0 │              2 │
       
   143  │ UUID            │ a2b5f230-a795-4f6f-a39b-9b57686c86d5 │ /home                │ btrfs         │ relatime                              │              0 │              2 │
       
   144  │                 │ /dev/mapper/sdf_crypt                │ /mnt/private         │ xfs           │ relatime                              │              0 │              2 │
       
   145  ╰─────────────────┴──────────────────────────────────────┴──────────────────────┴───────────────┴───────────────────────────────────────┴────────────────┴────────────────╯
       
   146 Record count: 5]]></pre>
       
   147 
       
   148 		<p>And we can do the same also with a remote <code>fstab</code> or <code>mtab</code>; just by adding <code>ssh</code> to the pipeline:</p>
       
   149 
       
   150 		<m:pre jazyk="bash"><![CDATA[ssh example.com cat /etc/mtab | relpipe-in-fstab | relpipe-out-tabular]]></m:pre>
       
   151 		
       
   152 		<p>
       
   153 			The <code>cat</code> runs remotely. The <code>relpipe-in-fstab</code> and <code>relpipe-out-tabular</code> run on our machine.
       
   154 		</p>
       
   155 		
       
   156 		<p>
       
   157 			n.b. the <code>relpipe-in-fstab</code> reads the <code>/etc/fstab</code> if executed on TTY. Otherwise, it reads the STDIN.
       
   158 		</p>
       
   159 		
   124 		<h3>relpipe-tr-validator</h3>
   160 		<h3>relpipe-tr-validator</h3>
   125 		
   161 		
   126 		<p>
   162 		<p>
   127 			Just a passthrough command, so these pipelines should produce the same hash:
   163 			Just a passthrough command, so these pipelines should produce the same hash:
   128 		</p>
   164 		</p>