summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul W. Rankin <pwr@bydasein.com>2021-04-27 01:41:26 +1000
committerPaul W. Rankin <pwr@bydasein.com>2021-04-27 01:41:26 +1000
commit60ec3542764aacc2ac3758fc310a50c024de18b7 (patch)
treeaeac1dcdf2c8ce35ad000b7bf6041dea54a660b7
parentd9a14736520d7cd6edb607efb817801fad0ff52f (diff)
downloadblip-60ec3542764aacc2ac3758fc310a50c024de18b7.zip
blip.sh: remove unnecessary variable
-rw-r--r--blip.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/blip.sh b/blip.sh
index 9c7504b..f8caa46 100644
--- a/blip.sh
+++ b/blip.sh
@@ -102,12 +102,11 @@ list() {
print_fields="$1"
[ -n "$2" ] && print_linenum='FNR,'
search_scope="$3"
+ query="$4"
urls=$(collect)
- if $(int_p "$4"); then
- seek_line="$4"
- urls=$(echo "$urls" | awk -F '\t' "FNR == $seek_line { print $print_linenum $print_fields }")
- elif [ -n "$4" ]; then
- query="$4"
+ if $(int_p "$query"); then
+ urls=$(echo "$urls" | awk -F '\t' "FNR == $query { print $print_linenum $print_fields }")
+ elif [ -n "$query" ]; then
urls=$(echo "$urls" | awk -F '\t' "$search_scope ~ /$query/ { print $print_linenum $print_fields }")
else
urls=$(echo "$urls" | awk -F '\t' "{ print $print_linenum $print_fields }")