aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-12-06 14:25:39 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-12-06 14:26:06 +1300
commit0c4bf7de3604eeb00e2cf590867d43ceb2f0f85d (patch)
tree124ccc28400bfa078f0a701e6610cbba9564a710 /bin
parent6dff198ba1196a2b31274744365a940bb34898a2 (diff)
downloaddotfiles-0c4bf7de3604eeb00e2cf590867d43ceb2f0f85d.tar.gz
dotfiles-0c4bf7de3604eeb00e2cf590867d43ceb2f0f85d.zip
Remove unneeded semicolon from sh "for VAR ; do"
It turns out the semicolon belongs to the "in" syntax, and is optional without it.
Diffstat (limited to 'bin')
-rw-r--r--bin/ap.sh2
-rw-r--r--bin/apf.sh2
-rw-r--r--bin/d2u.sh2
-rw-r--r--bin/eds.sh4
-rw-r--r--bin/fnp.sh2
-rw-r--r--bin/loc.sh2
-rw-r--r--bin/mex.sh2
-rw-r--r--bin/mkcp.sh2
-rw-r--r--bin/mked.sh2
-rw-r--r--bin/mkmv.sh2
-rw-r--r--bin/mkvi.sh2
-rw-r--r--bin/pp.sh2
-rw-r--r--bin/sqs.sh2
-rw-r--r--bin/stbl.sh2
-rw-r--r--bin/stex.sh2
-rw-r--r--bin/stws.sh2
-rw-r--r--bin/sue.sh2
-rw-r--r--bin/u2d.sh2
-rw-r--r--bin/xgo.sh2
19 files changed, 20 insertions, 20 deletions
diff --git a/bin/ap.sh b/bin/ap.sh
index 1d6376cc..2b13dfde 100644
--- a/bin/ap.sh
+++ b/bin/ap.sh
@@ -10,7 +10,7 @@ shift
# Iterate through the remaining args; it's legal for there to be none, but in
# that case the user may as well just have invoked the command directly
-for arg ; do
+for arg do
# If this is the first iteration, clear the params away (we grabbed them in
# the for statement)
diff --git a/bin/apf.sh b/bin/apf.sh
index 5e40e9b8..e11145ff 100644
--- a/bin/apf.sh
+++ b/bin/apf.sh
@@ -16,7 +16,7 @@ shift 2
if [ "$#" -gt 0 ] ; then
# Iterate through any remaining arguments
- for carg ; do
+ for carg do
# If this is the first command argument, then before we add it, we'll
# add all the ones from the file first if it exists
diff --git a/bin/d2u.sh b/bin/d2u.sh
index 892c446b..eceb11de 100644
--- a/bin/d2u.sh
+++ b/bin/d2u.sh
@@ -10,7 +10,7 @@ fi
r=$(printf '\r')
# Iterate over arguments and apply the same ed(1) script to each of them
-for fn ; do
+for fn do
# Note the heredoc WORD is intentionally unquoted because we want to expand
# $r within it to get a literal carriage return; the escape characters
diff --git a/bin/eds.sh b/bin/eds.sh
index c85069c6..c692cb30 100644
--- a/bin/eds.sh
+++ b/bin/eds.sh
@@ -21,7 +21,7 @@ case :$PATH: in
esac
# Prepend the path to each of the names given if they don't look like options
-for arg ; do
+for arg do
[ -n "$reset" ] || set -- && reset=1
case $arg in
--)
@@ -44,7 +44,7 @@ done
"${VISUAL:-"${EDITOR:-ed}"}" "$@"
# Make any created scripts executable if they now appear to be files
-for script ; do
+for script do
[ -f "$script" ] || continue
chmod +x -- "$script"
done
diff --git a/bin/fnp.sh b/bin/fnp.sh
index ec68e51f..bc0c7e21 100644
--- a/bin/fnp.sh
+++ b/bin/fnp.sh
@@ -4,7 +4,7 @@
[ "$#" -gt 0 ] || set -- -
# Iterate through arguments
-for arg ; do
+for arg do
# We'll print the filename "-stdin-" rather than - just to be slightly more
# explicit
diff --git a/bin/loc.sh b/bin/loc.sh
index 995c6932..214e87da 100644
--- a/bin/loc.sh
+++ b/bin/loc.sh
@@ -7,7 +7,7 @@ if [ "$#" -eq 0 ] ; then
fi
# Iterate through each search term and run an appropriate find(1) command
-for pat ; do
+for pat do
# Skip dotfiles, dotdirs, and symbolic links; print anything that matches
# the term as a substring (and stop iterating through it)
diff --git a/bin/mex.sh b/bin/mex.sh
index cf4e07e7..e79f8f2f 100644
--- a/bin/mex.sh
+++ b/bin/mex.sh
@@ -9,7 +9,7 @@ if [ "$#" -eq 0 ] ; then
fi
# Iterate through the given names
-for name ; do
+for name do
# Clear the found variable
found=
diff --git a/bin/mkcp.sh b/bin/mkcp.sh
index 10308263..3acf12f0 100644
--- a/bin/mkcp.sh
+++ b/bin/mkcp.sh
@@ -7,7 +7,7 @@ if [ "$#" -lt 2 ] ; then
fi
# Get the last argument (the directory to create)
-for dir ; do : ; done
+for dir do : ; done
# Create it, or bail
mkdir -p -- "$dir" || exit
diff --git a/bin/mked.sh b/bin/mked.sh
index 4e280205..93e21573 100644
--- a/bin/mked.sh
+++ b/bin/mked.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# Create paths to all files before invoking editor
-for file ; do
+for file do
mkdir -p -- "${file%/*}" || exit
done
exec "$EDITOR" "$@"
diff --git a/bin/mkmv.sh b/bin/mkmv.sh
index 53b5aa8f..832c205e 100644
--- a/bin/mkmv.sh
+++ b/bin/mkmv.sh
@@ -7,7 +7,7 @@ if [ "$#" -lt 2 ] ; then
fi
# Get the last argument (the directory to create)
-for dir ; do : ; done
+for dir do : ; done
# Create it, or bail
mkdir -p -- "$dir" || exit
diff --git a/bin/mkvi.sh b/bin/mkvi.sh
index 244b89f8..c5974383 100644
--- a/bin/mkvi.sh
+++ b/bin/mkvi.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# Create paths to all files before invoking editor
-for file ; do
+for file do
mkdir -p -- "${file%/*}" || exit
done
exec "$VISUAL" "$@"
diff --git a/bin/pp.sh b/bin/pp.sh
index b472a012..e9c25571 100644
--- a/bin/pp.sh
+++ b/bin/pp.sh
@@ -1,5 +1,5 @@
# Print the full path to each argument; path need not exist
-for arg ; do
+for arg do
case $arg in
/*) path=$arg ;;
*) path=$PWD/$arg ;;
diff --git a/bin/sqs.sh b/bin/sqs.sh
index 28435059..447a6563 100644
--- a/bin/sqs.sh
+++ b/bin/sqs.sh
@@ -8,7 +8,7 @@ if [ "$#" -eq 0 ] ; then
fi
# Iterate through the given files
-for sn ; do
+for sn do
# Strip trailing slash if any and then query string
sn=${sn%/}
diff --git a/bin/stbl.sh b/bin/stbl.sh
index 23d77703..2f6702b1 100644
--- a/bin/stbl.sh
+++ b/bin/stbl.sh
@@ -7,7 +7,7 @@ if [ "$#" -eq 0 ] ; then
fi
# Iterate over arguments and apply the same ed(1) script to each of them
-for fn ; do
+for fn do
ed -s -- "$fn" <<'EOF' || ex=1
$g/^ *$/d
w
diff --git a/bin/stex.sh b/bin/stex.sh
index 14d2cabf..b27d9cf8 100644
--- a/bin/stex.sh
+++ b/bin/stex.sh
@@ -13,7 +13,7 @@ ext=$1
shift
# Iterate through the given files (remaining args)
-for sn ; do
+for sn do
# Strip trailing slash if any and then extension
sn=${sn%/}
diff --git a/bin/stws.sh b/bin/stws.sh
index ce2c14d0..59a8652a 100644
--- a/bin/stws.sh
+++ b/bin/stws.sh
@@ -7,7 +7,7 @@ if [ "$#" -eq 0 ] ; then
fi
# Iterate over arguments and apply the same ed(1) script to each of them
-for fn ; do
+for fn do
ed -s -- "$fn" <<'EOF' || ex=1
g/ *$/ s/ *$//
w
diff --git a/bin/sue.sh b/bin/sue.sh
index 654c041f..34343e4a 100644
--- a/bin/sue.sh
+++ b/bin/sue.sh
@@ -4,7 +4,7 @@
user=
# Iterate over the given files
-for file ; do
+for file do
# Get the file's owner, or bail
file_owner=$(stat -c %U -- "$file") || exit
diff --git a/bin/u2d.sh b/bin/u2d.sh
index 31030341..cdbe9a33 100644
--- a/bin/u2d.sh
+++ b/bin/u2d.sh
@@ -10,7 +10,7 @@ fi
r=$(printf '\r')
# Iterate over arguments and apply the same ed(1) script to each of them
-for fn ; do
+for fn do
# Note the heredoc WORD is intentionally unquoted because we want to expand
# $r within it to get a literal carriage return; the escape characters
diff --git a/bin/xgo.sh b/bin/xgo.sh
index 3fb11fde..e627f9c6 100644
--- a/bin/xgo.sh
+++ b/bin/xgo.sh
@@ -7,7 +7,7 @@ if [ "$#" -eq 0 ] ; then
fi
# Iterate over the URL arguments
-for url ; do (
+for url do (
# Look for patterns in the URL that suggest transformations
case $url in