mirror of https://github.com/tLDP/LDP
23 lines
364 B
Bash
23 lines
364 B
Bash
#!/bin/bash
|
|
|
|
if [ -z "$1" ]
|
|
then
|
|
Filename=names.data # Default, if no filename specified.
|
|
else
|
|
Filename=$1
|
|
fi
|
|
|
|
TRUE=1
|
|
|
|
if [ "$TRUE" ] # if true and if : also work.
|
|
then
|
|
read name
|
|
echo $name
|
|
fi <"$Filename"
|
|
# ^^^^^^^^^^^^
|
|
|
|
# Reads only first line of file.
|
|
# An "if/then" test has no way of iterating unless embedded in a loop.
|
|
|
|
exit 0
|