relpipe-data/examples/relpipe-out-fstab.sh
branchv_0
changeset 180 d342de2e09a4
child 194 cd5524d03739
equal deleted inserted replaced
179:029dc972f1f2 180:d342de2e09a4
       
     1 #!/bin/bash
       
     2 
       
     3 (
       
     4 	# Just troll-in the first record:
       
     5 	relpipe-in-cli generate Heathers 7 \
       
     6 		Duke string McNamara string Chandler string Veronica string J.D. string \
       
     7 		Big string Fun string \
       
     8 		'' '# <file system>' '<mount point>' '<type>' '<options>' '<dump>' '<pass>';
       
     9 		# relpipe-out-nullbyte processes only attribute values
       
    10 	# Read the actual pipe's input:
       
    11 	cat
       
    12 )	| relpipe-out-nullbyte \
       
    13 	| xargs --null --max-args=7 perl -e \
       
    14 		'printf("%-*s %-*s %-*s %-*s %-*s %s\n",
       
    15 			# following numbers define paddings:
       
    16 			50, ($ARGV[0] eq "" ? $ARGV[1] : "$ARGV[0]=$ARGV[1]"),
       
    17 			40, ($ARGV[2] eq "" ? "none" : $ARGV[2]),
       
    18 			16, $ARGV[3],
       
    19 			50, $ARGV[4],
       
    20 			 8, $ARGV[5],
       
    21 			$ARGV[6]
       
    22 		);'