Skip to content

Commit b1bfb02

Browse files
authored
Ensure script matches main text
1 parent 008325b commit b1bfb02

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#!/bin/bash
2+
# This script loops through .txt files, returns the
3+
# file name, first line, and last line of the file
24

3-
for filename in *.txt
5+
for file in *.txt
46
do
5-
echo $filename
6-
head -n 5 $filename
7-
tail -n 5 $filename
8-
done
7+
echo "$file"
8+
head -n 1 "$file"
9+
tail -n 1 "$file"
10+
done

0 commit comments

Comments
 (0)