|
#!/bin/bash
# read from /etc/fstab
file=/etc/fstab
read line1 < $File
echo "First line in $File is:"
echo "$line1"
echo
echo "Second line in $File is:"
echo "$line2"
exit 0
[root@oracletest shelltxt]# ./111
./111: line 9: $File: ambiguous redirect
First line in is:
Second line in is: |
|