diff --git a/episodes/files/my_first_bash_script.sh b/episodes/files/my_first_bash_script.sh index 4cd0315f..be0891d7 100644 --- a/episodes/files/my_first_bash_script.sh +++ b/episodes/files/my_first_bash_script.sh @@ -1,8 +1,10 @@ #!/bin/bash +# This script loops through .txt files, returns the +# file name, first line, and last line of the file -for filename in *.txt +for file in *.txt do - echo $filename - head -n 5 $filename - tail -n 5 $filename -done \ No newline at end of file + echo "$file" + head -n 1 "$file" + tail -n 1 "$file" +done