staging: rtl8192u: remove redundant assignment to pointer crypt
[linux/fpc-iii.git] / tools / testing / selftests / kselftest / prefix.pl
blobec7e48118183504758bcca0b19d71f34c6b5717f
1 #!/usr/bin/perl
2 # SPDX-License-Identifier: GPL-2.0
3 # Prefix all lines with "# ", unbuffered. Command being piped in may need
4 # to have unbuffering forced with "stdbuf -i0 -o0 -e0 $cmd".
5 use strict;
7 binmode STDIN;
8 binmode STDOUT;
10 STDOUT->autoflush(1);
12 my $needed = 1;
13 while (1) {
14 my $char;
15 my $bytes = sysread(STDIN, $char, 1);
16 exit 0 if ($bytes == 0);
17 if ($needed) {
18 print "# ";
19 $needed = 0;
21 print $char;
22 $needed = 1 if ($char eq "\n");