From 56c6155640deb9fb30b851f5aed6c36b5b9cec37 Mon Sep 17 00:00:00 2001 From: lhark Date: Tue, 11 Oct 2016 06:52:41 +0200 Subject: [PATCH] Suppress error when /dev/shm/prompt_msg does not exist --- functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions b/functions index 13a1f5a..23b4e05 100755 --- a/functions +++ b/functions @@ -158,7 +158,7 @@ space_sh_git_prompt () { } prompt_msg () { - line=$(tail -1 /dev/shm/prompt_msg) + line=$(tail -1 /dev/shm/prompt_msg) 2> /dev/null case $line in update_rc) msg="Update ready for rc. Run uprc to proceed";; @@ -174,7 +174,7 @@ prompt_msg () { esac # Remove last message from stack before it drives us mad - sed -i '$ d' /dev/shm/prompt_msg + sed -i '$ d' /dev/shm/prompt_msg 2> /dev/null echo $msg }