Re: Advise needed to write a script

2003-07-21 Thread Marc Ramirez
On Sun, 20 Jul 2003, Jimmy wrote:

> Hi
> Good day to you. I need your advice to wrte a script
> 1) stores the sum of A plus B in variable C
> 2)Stores the difference of B minus A in variable C
>
> If A is 5 and B is 10. Please advice me on this issue pls .
> Hope to hear from you soon.


#!/bin/sh

# set A to 5
# set B to 10
# set C to A plus B
# set C to B minus A


Tree falling in the woods...  Tree falling in the woods...


> Cheers
>
> Jimmy Chan
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
>
>


--
Marc Ramirez
Blue Circle Software Corporation
513-688-1070 (main)
513-382-1270 (direct)
www.bluecirclesoft.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Advise needed to write a script

2003-07-19 Thread Matthew Graybosch
On Saturday 19 July 2003 04:09 pm, Jerry McAllister wrote:

> > Check out the "Advanced Bash-Scripting Guide" on tldp.org.
>
> Oh geez.   Have him do it in Perl or ...

Hey, at least nobody suggested using csh, >^..^<

-- 
Matthew Graybosch
http://www.starbreaker.net
"I am become root, shatterer of kernels."

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Advise needed to write a script

2003-07-19 Thread Jerry McAllister
> 
> On Sun, Jul 20, 2003 at 12:50:25AM +0800, Jimmy wrote:
> > Hi
> > Good day to you. I need your advice to wrte a script 
> > 1) stores the sum of A plus B in variable C 
> > 2)Stores the difference of B minus A in variable C 
> > 
> > If A is 5 and B is 10. Please advice me on this issue pls .
> > Hope to hear from you soon.
> 
> Smells like a homework assignment to me. I'm not going to tell you the
> answer, but I will tell you how to find out :P
> 
> Check out the "Advanced Bash-Scripting Guide" on tldp.org.

Oh geez.   Have him do it in Perl or ...


> 
> -- Josh
> 
> > 
> > Cheers
> > 
> > Jimmy Chan
> > ___
> > [EMAIL PROTECTED] mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Advise needed to write a script

2003-07-19 Thread oremanj
On Sun, Jul 20, 2003 at 12:50:25AM +0800, Jimmy wrote:
> Hi
> Good day to you. I need your advice to wrte a script 
> 1) stores the sum of A plus B in variable C 
> 2)Stores the difference of B minus A in variable C 
> 
> If A is 5 and B is 10. Please advice me on this issue pls .
> Hope to hear from you soon.

Smells like a homework assignment to me. I'm not going to tell you the
answer, but I will tell you how to find out :P

Check out the "Advanced Bash-Scripting Guide" on tldp.org.

-- Josh

> 
> Cheers
> 
> Jimmy Chan
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Advise needed to write a script

2003-07-19 Thread Jimmy
Hi
Good day to you. I need your advice to wrte a script 
1) stores the sum of A plus B in variable C 
2)Stores the difference of B minus A in variable C 

If A is 5 and B is 10. Please advice me on this issue pls .
Hope to hear from you soon.

Cheers

Jimmy Chan
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: fwd: Advise needed to write a script

2003-06-21 Thread Mark Pearce
> How do you resove?
> 
> I just insert in the crontab a reboot at 7:00 AM.
> I think that this is not the best solution.
> May be the PPPD have a bug.

Hi

I created a script to kill my ppp, sleep for 30 seconds and restart ppp,
this seems to work just fine, but also I have a cronjob to do this
sometimes every 2 hours.

I seem to have had this problem with ppp since 4.7-STABLE, but only with
the server iniating the connection, not the one being dialed into.  I
get a load of rejected compression errors on the server side.

I suspect a bug within ppp somewhere.

Mark
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Advise needed to write a script

2003-06-06 Thread Chuck Swiger
Mark Pearce wrote:
[ ... ]
What I would like to do is the following.
create a script that runs contineously in the background, checking on
the IP address every 5 minutes, and if it's not there, run a script to
kill and restart ppp.
How are you invoking PPP?  Try the "-ddial" option; it should convince PPP to 
reconnect without the need for an external script.

-Chuck

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Advise needed to write a script

2003-06-05 Thread Mark Pearce
Hi

I have a permanent internet connection using modems.  Every now and then
I loose my connection, or at least, I loose the IP but I remain
connected.  If I reboot my box, I come back online with the IP address
and everything works 100%, then a while later the IP dissapears but I
remain connected.

I have found 2 ways to resolve this, either reboot the server or write a
script that kills and restarts ppp, I am using userland-ppp.

What I would like to do is the following.
create a script that runs contineously in the background, checking on
the IP address every 5 minutes, and if it's not there, run a script to
kill and restart ppp.

I have no clue where to start on this.

I'd appreciate any info on writing something or pointing me in the right
direction to resolve this problem.

Thanks

Mark
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"