aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorGravatar Ben Boeckel <MathStuf@gmail.com>2011-03-10 21:05:20 -0500
committerGravatar Ben Boeckel <MathStuf@gmail.com>2011-03-10 22:32:50 -0500
commit23e8be89ff2a6be9237203b08167c644a7fe9cd6 (patch)
treecd0fe97ca573838e76573e6af86d4fbb774224c8 /examples
parente417a25165fc1f6c8a0d96c3b7872e6e074f1840 (diff)
Clean up some printf calls
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/data/scripts/formfiller.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/data/scripts/formfiller.sh b/examples/data/scripts/formfiller.sh
index d34326f..1a49e82 100755
--- a/examples/data/scripts/formfiller.sh
+++ b/examples/data/scripts/formfiller.sh
@@ -139,15 +139,15 @@ if [ "$action" = 'load' ]; then
sed -e 's/^\(.\+\)$/<{br}>\1/' | \
tr -d '\n' | \
sed -e 's/<{br}>%{>\([^(]\+(\)\(radio\|checkbox\|text\|search\|textarea\|password\)):<}%/\\n\1\2):/g' )"
- printf '%s\n' "${fields}" | \
+ printf "%s\n" "${fields}" | \
sed -n -e "s/\([^(]\+\)(\(password\|text\|search\|textarea\)\+):[ ]*\(.\+\)/js $insertFunction; insert('\1', '\2', '\3', 0);/p" | \
sed -e 's/@/\\@/g;s/<{br}>/\\\\n/g' | socat - "unix-connect:$UZBL_SOCKET"
- printf '%s\n' "${fields}" | \
+ printf "%s\n" "${fields}" | \
sed -n -e "s/\([^{]\+\){\([^}]*\)}(\(radio\|checkbox\)):[ ]*\(.\+\)/js $insertFunction; insert('\1', '\3', '\2', \4);/p" | \
sed -e 's/@/\\@/g' | socat - "unix-connect:$UZBL_SOCKET"
elif [ "$action" = "once" ]; then
tmpfile="$( mktemp )"
- printf 'js %s dump(); \n' "$dumpFunction" | \
+ printf "js %s dump();\n" "$dumpFunction" | \
socat - "unix-connect:$UZBL_SOCKET" | \
sed -n -e '/^[^(]\+([^)]\+):/p' > "$tmpfile"
echo "$MODELINE" >> "$tmpfile"
@@ -163,10 +163,10 @@ elif [ "$action" = "once" ]; then
sed -e 's/^\(.\+\)$/<{br}>\1/' | \
tr -d '\n' | \
sed -e 's/<{br}>%{>\([^(]\+(\)\(radio\|checkbox\|text\|search\|textarea\|password\)):<}%/\\n\1\2):/g' )"
- printf '%s\n' "${fields}" | \
+ printf "%s\n" "${fields}" | \
sed -n -e "s/\([^(]\+\)(\(password\|text\|search\|textarea\)\+):[ ]*\(.\+\)/js $insertFunction; insert('\1', '\2', '\3', 0);/p" | \
sed -e 's/@/\\@/g;s/<{br}>/\\\\n/g' | socat - "unix-connect:$UZBL_SOCKET"
- printf '%s\n' "${fields}" | \
+ printf "%s\n" "${fields}" | \
sed -n -e "s/\([^{]\+\){\([^}]*\)}(\(radio\|checkbox\)):[ ]*\(.\+\)/js $insertFunction; insert('\1', '\3', '\2', \4);/p" | \
sed -e 's/@/\\@/g' | socat - "unix-connect:$UZBL_SOCKET"
rm -f "$tmpfile"
@@ -190,7 +190,7 @@ else
# login(text):
# passwd(password):
#
- printf 'js %s dump(); \n' "$dumpFunction" | \
+ printf "js %s dump();\n" "$dumpFunction" | \
socat - "unix-connect:$UZBL_SOCKET" | \
sed -n -e '/^[^(]\+([^)]\+):/p' >> "$form_file"
fi