Created
June 16, 2014 06:35
-
-
Save kunpengku/7637b110010822a62edd to your computer and use it in GitHub Desktop.
怎么取文件的前两行
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
File=/etc/fstab | |
{ | |
read line1 | |
read line2 | |
} < $File | |
echo "First line is $line1" | |
echo "First line is $line2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment