File: matting.sh

package info (click to toggle)
chezscheme 9.5.4%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 61,640 kB
  • sloc: ansic: 17,508; sh: 759; makefile: 509; csh: 423
file content (12 lines) | stat: -rwxr-xr-x 263 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
# We don't use grep because on Windows, it doesn't flush its output.
live=no
while read -r line; do
    echo "$line" >> mats.out
    if [[ "$line" = matting* ]]; then
	echo "$line"
	live=yes
    elif [[ "$live" = no ]]; then
	echo "$line"
    fi
done