2001-07-10 14:25:50 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ -z "$1" ]
|
|
|
|
then
|
2001-09-04 13:27:31 +00:00
|
|
|
Filename=names.data # Default, if no filename specified.
|
2001-07-10 14:25:50 +00:00
|
|
|
else
|
|
|
|
Filename=$1
|
|
|
|
fi
|
|
|
|
|
|
|
|
TRUE=1
|
|
|
|
|
2001-09-04 13:27:31 +00:00
|
|
|
if [ "$TRUE" ] # if true and if : also work.
|
2001-07-10 14:25:50 +00:00
|
|
|
then
|
|
|
|
read name
|
|
|
|
echo $name
|
2014-07-05 13:38:40 +00:00
|
|
|
fi <"$Filename"
|
2001-10-15 14:21:41 +00:00
|
|
|
# ^^^^^^^^^^^^
|
|
|
|
|
2001-07-10 14:25:50 +00:00
|
|
|
# Reads only first line of file.
|
2001-09-04 13:27:31 +00:00
|
|
|
# An "if/then" test has no way of iterating unless embedded in a loop.
|
2001-07-10 14:25:50 +00:00
|
|
|
|
|
|
|
exit 0
|