Skip to content

Commit

Permalink
-F, --fixed-strings PATTERNS are strings (#8)
Browse files Browse the repository at this point in the history
-x, --line-regexp         match only whole lines
  • Loading branch information
markusressel authored Mar 29, 2022
1 parent c8bbf5a commit b5fcf1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zfs-inplace-rebalancing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function color_echo () {
function get_rebalance_count () {
file_path=$1

line_nr=$(grep -n "${file_path}" "./${rebalance_db_file_name}" | head -n 1 | cut -d: -f1)
line_nr=$(grep -xF -n "${file_path}" "./${rebalance_db_file_name}" | head -n 1 | cut -d: -f1)
if [ -z "${line_nr}" ]; then
echo "0"
return
Expand Down Expand Up @@ -161,7 +161,7 @@ function rebalance () {

if [ "${passes_flag}" -ge 1 ]; then
# update rebalance "database"
line_nr=$(grep -n "${file_path}" "./${rebalance_db_file_name}" | head -n 1 | cut -d: -f1)
line_nr=$(grep -xF -n "${file_path}" "./${rebalance_db_file_name}" | head -n 1 | cut -d: -f1)
if [ -z "${line_nr}" ]; then
rebalance_count=1
echo "${file_path}" >> "./${rebalance_db_file_name}"
Expand Down

0 comments on commit b5fcf1a

Please sign in to comment.