Skip to content

Commit

Permalink
filter out the variable declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzsequence authored Jul 12, 2023
1 parent 6949d50 commit 00ec931
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/test-textfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ if [ -z "$filename" ]; then
exit 1
fi

# Read the contents of the file
file_contents=$(cat "$filename")
# Read the contents of the file and filter out lines starting with "declare -r"
file_contents=$(grep -v '^declare -r' "$filename")

# Enable case-insensitive matching
shopt -s nocasematch
Expand Down

0 comments on commit 00ec931

Please sign in to comment.