<p dir="ltr">Your issue is that something needs to happen after the "then".</p>
<p dir="ltr">If you are planning on doing something there at some point then just put a pointless command in there (e.g. true), otherwise change the if statement to be the opposite (!=).</p>
<div class="gmail_quote">On 6 Jan 2014 20:37, "Jean van Wyngaardt" <<a href="mailto:gabrieldrumming@gmail.com">gabrieldrumming@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div>Thanks Stuart</div><div><br></div><div>The error coming up is this:</div><div><br></div><div>/home/ladmin/Desktop/vpn.sh: 7: /home/ladmin/Desktop/vpn.sh: Syntax error: "else" unexpected</div>
<div><br></div><div>Appreciate your help on this. Like you say, it probably needs a "do nothing" type entry. What do you suggest?</div><br><div>

Jean
<br>
<br>
<font color="#595050">
<strong>Jean van Wyngaardt</strong>
<br>
<br>
07599 428068
<br>
<a href="mailto:info@jeangabriel.co.uk" target="_blank">info@jeangabriel.co.uk</a>
<br>
<a href="http://runlevel.co.uk" target="_blank">http://runlevel.co.uk</a>
<br>
<a href="http://mactribe.co.uk" target="_blank">http://mactribe.co.uk</a>
</font>

</div>
<br><div><div>On 6 Jan 2014, at 20:27, Stuart Sears <<a href="mailto:stuart@sjsears.com" target="_blank">stuart@sjsears.com</a>> wrote:</div><br><blockquote type="cite">On 06/01/14 20:17, Jean van Wyngaardt wrote:<br>
<blockquote type="cite">Hey guys<br><br>Working out this VPN script and it won't run because of line 7 (highlighted in bold below). Seeing as my scripting knowledge is limited, I thought I might check with you!<br></blockquote>
<br>for questions like this, it helps enormously if you also paste the error<br>message you receive :)<br><br><blockquote type="cite">#!/bin/sh<br>while [ "true" ]<br>do<br>    vpnck=$(nmcli con status uuid 3e46a1d0-ab02-4d69-bd36-31dfcc01af6d)<br>
    if [[ $vpnck == *cryptocloud* ]]<br>    then<br></blockquote><br>Surely there should be something here, no?<br>What do you expect the script to do if this condition is true?<br>Even a "that's okay, do nothing command" would be okay.<br>
<br><blockquote type="cite">    else<br>      (sleep 1s && nmcli con up uuid 3e46a1d0-ab02-4d69-bd36-31dfcc01af6d)<br>    fi<br>    sleep 20<br>done<br></blockquote><br>Regards,<br><br>Stuart<br><br>-- <br>Stuart Sears RHCA etc.<br>
"It's today!" said Piglet.<br>"My favourite day," said Pooh.<br><br>_______________________________________________<br>GLLUG mailing list<br><a href="mailto:GLLUG@mailman.lug.org.uk" target="_blank">GLLUG@mailman.lug.org.uk</a><br>
<a href="https://mailman.lug.org.uk/mailman/listinfo/gllug" target="_blank">https://mailman.lug.org.uk/mailman/listinfo/gllug</a><br></blockquote></div><br></div><br>_______________________________________________<br>
GLLUG mailing list<br>
<a href="mailto:GLLUG@mailman.lug.org.uk">GLLUG@mailman.lug.org.uk</a><br>
<a href="https://mailman.lug.org.uk/mailman/listinfo/gllug" target="_blank">https://mailman.lug.org.uk/mailman/listinfo/gllug</a><br>
<br></blockquote></div>