File: readrec.sh

package info (click to toggle)
recutils 1.9-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,328 kB
  • sloc: ansic: 80,756; sh: 11,649; yacc: 1,978; makefile: 323; lex: 225; sed: 16
file content (25 lines) | stat: -rwxr-xr-x 473 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash

# Enabling the Bash builtin 'readrec'
# http://www.gnu.org/software/recutils/manual/recutils.html#Bash-Builtins
enable -f /usr/lib/recutils/bash-builtins/readrec.so readrec

while readrec
  do
    if [ $Checked = "no" ]
      then
        echo "You are been checked. $Name <${Email[0]}>"
    sleep 1
    fi
  done << RECORDS
Name: Mr. Foo
Email: foo@bar.com
Email: bar@baz.net
Checked: no

Name: Mr. Bar
Email: bar@foo.com
Telephone: 9996
Checked: no
RECORDS