I have the following shell script on debian 7:

#!/bin/sh


case "$IFACE" in
    lo)
        # The loopback interface does not count.
        # only run when some other interface comes up
        exit 0
        ;;
    *)
        ;;
esac

(
flock -e 200

FLAGFILE=/var/run/cyvo-auto-started

if [ -e $FLAGFILE ]; then
    exit 0
else
    touch $FLAGFILE
fi

# Launch CyVo without the lock and as cyvo user
flock -u 200
sudo -u cyvo /usr/local/bin/cyvo-launch.sh

) 200&gt;/var/lock/cyvo-autostart-lock # word unexpected here? (line 29)


The error it hives me is:

./cyvo: 29: ./cyvo: Syntax error: word unexpected


This is really confusing to me because it's the syntax suggested by the flock command. It's to pass file descriptor 200 pointing to /var/lock/cyvo-autostart-lock to the subroutine in the ().

What am I doing wrong?


Question: How to accept email *only* from white-listed addresses in Gmail?
Answer: You could use multiple inboxes and labels, with the following settings:


Create two labels for those 2 very important addresses. (label1 1 &amp; label2)
Create filters to attach those labels to messages from those addresses, and have them skip the inbox.
Enable the multiple inboxes option via Gear button/Settings/labs.
Under settings/multiple inboxes set the top 2 boxes as "is:label1" and "is:label2"
Increase the maximum page size to 50, to show 50 messages/conversations for those labels.
Set "Extra panels positioning:" to "Above the inbox" via the radio button.
Click save changes.


Only messages associated with those address will end up in the top two inboxes. The rest of the emails will be either in spam or the main inbox. 

You can quickly archive all the unwanted messages by using the quick select shortcut for the main inbox that is on the left side of the taskbar for that inbox. Select all, slap a label on them, and then click archive. They will then only exist under that label, and be hidden from the main inbox. 

Using multiple inboxes and the labels will make sure that any reply that can be associated with a message from the key addresses will appear with the appropriate label attached, and displayed at the top of the specific inbox.