Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
|
|
@ -0,0 +1,12 @@
|
|||
get_nth_line() {
|
||||
local file=$1 n=$2 line
|
||||
while ((n-- > 0)); do
|
||||
if ! IFS= read -r line; then
|
||||
echo "No such line $2 in $file"
|
||||
return 1
|
||||
fi
|
||||
done < "$file"
|
||||
echo "$line"
|
||||
}
|
||||
|
||||
get_nth_line filename 7
|
||||
Loading…
Add table
Add a link
Reference in a new issue