aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/data/scripts/session.sh
diff options
context:
space:
mode:
authorGravatar Ben Boeckel <MathStuf@gmail.com>2011-03-10 21:09:03 -0500
committerGravatar Ben Boeckel <MathStuf@gmail.com>2011-03-10 22:32:50 -0500
commit5f2a6b9371fcf2ca78143cd255242e1cacac6ad1 (patch)
tree99ed27b7f261673b85c13bf222ed36b02d67cf76 /examples/data/scripts/session.sh
parent8e1eee5059058a774ba3124ce18d5f0d52415202 (diff)
Use printf rather than echo
Diffstat (limited to 'examples/data/scripts/session.sh')
-rwxr-xr-xexamples/data/scripts/session.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/examples/data/scripts/session.sh b/examples/data/scripts/session.sh
index c95a9e5..e2f97fe 100755
--- a/examples/data/scripts/session.sh
+++ b/examples/data/scripts/session.sh
@@ -53,27 +53,27 @@ case $act in
"endinstance")
if [ -z "$UZBL_FIFO" ]; then
- echo "session manager: endinstance must be called from uzbl"
+ printf "session manager: endinstance must be called from uzbl\n"
exit 1
fi
- [ "$UZBL_URI" != "(null)" ] && echo "$UZBL_URI" >> "$UZBL_SESSION_FILE"
- echo exit > "$UZBL_FIFO"
+ [ "$UZBL_URI" != "(null)" ] && printf "$UZBL_URI\n" >> "$UZBL_SESSION_FILE"
+ printf "exit\n" > "$UZBL_FIFO"
;;
"endsession")
for fifo in "$UZBL_FIFO_DIR/uzbl_fifo_*"; do
if [ "$fifo" != "$UZBL_FIFO" ]; then
- echo "spawn $scriptfile endinstance" > "$fifo"
+ printf "spawn $scriptfile endinstance\n" > "$fifo"
fi
done
- [ -z "$UZBL_FIFO" ] || echo "spawn $scriptfile endinstance" > "$UZBL_FIFO"
+ [ -z "$UZBL_FIFO" ] || printf "spawn $scriptfile endinstance\n" > "$UZBL_FIFO"
;;
*)
- echo "session manager: bad action"
- echo "Usage: $scriptfile [COMMAND] where commands are:"
- echo " launch - Restore a saved session or start a new one"
- echo " endinstance - Quit the current instance. Must be called from uzbl"
- echo " endsession - Quit the running session."
+ printf "session manager: bad action\n"
+ printf "Usage: $scriptfile [COMMAND] where commands are:\n"
+ printf " launch - Restore a saved session or start a new one\n"
+ printf " endinstance - Quit the current instance. Must be called from uzbl\n"
+ printf " endsession - Quit the running session.\n"
;;
esac