From the course: Learning Linux Shell Scripting

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Challenge: Read a text file

Challenge: Read a text file - Linux Tutorial

From the course: Learning Linux Shell Scripting

Challenge: Read a text file

(clanging) - [Instructor] Let's show what we know with a challenge. Create a script named read3.sh. Have it read a file name passed as a parameter. It should only display the first three lines of the file with line counts. Use what you already know how to do. Give yourself five or 10 minutes to complete this challenge.

Contents