I wrote a script that when run as daemon checks whether pppd is running, otherwise boots it, iterativelyCopied in a file pppdchk.sh#!/bin/bashdone=0while:dox=0x='pidof pppd'if [$x != "\n"]thensleep 1elsepon dsl-providersleep 1fi done

instead of testing if a non-quoted variable (that should be quoted (always quote variables!)) is a line break (that simple test can't see), you should test whether varibale is empty or not (see help test).

Talking to a child of 6 years, "... the reason quantum mechanical problems are addressed to by Hilbert space mathematics is because the states of the system in question obey the laws of linear superposition..."

Your script barfs because you declared x=0 (a digit) and then tried to compare that to non-digit (if [$x != "\n"]) using an improperly constructed[[ (missing spaces) ]] test operator. All of which is very well documented in several real-life methods for properly constructed [[ test ]] mechanisms.

Who is online

Users browsing this forum: Google [Bot] and 7 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum