Code Library
Home Submit Free Hosting Link To Us Contacts

Bash Reading lines in etc

Bash Reading lines in etc Bash Bash Reading lines in etc Download (.zip)



#!/bin/bash
# Reading lines in /etc/fstab.

File=/etc/fstab

{
read line1
read line2
} < $File

echo "First line in $File is:"
echo "$line1"
echo
echo "Second line in $File is:"
echo "$line2"

exit 0






Tatet