~johanvandegriff/unix-shell-programming-revised-edition-programs

ref: 2b467c818c691e6c743c2e147522f97443d4ba3c unix-shell-programming-revised-edition-programs/display -rw-r--r-- 455 bytes
2b467c81Johan Vandegriff added license 1 year, 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

#
# Display entry from the phonebook
#

if [ -n "$@" ]
then
  echo "$@" | tr "^" "\n" > /home/johanv/programs/phonebook/tmp.txt
  #$0
fi

print=/home/johanv/programs/phonebook/print

$print ' --------------------------------\n'
$print '|   O                        O   |\n'
while read line
do
  $print '                                 |\r| '$line'\n'
done < /home/johanv/programs/phonebook/tmp.txt
$print ' --------------------------------\n'