|
Home > Archive > alt.os.linux > September 2002 > Starting a script at the background
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Starting a script at the background
|
|
| Erik Boerstoel 2002-09-27, 11:29 am |
| Hi,
I'm loading the firmware of my Alcatel Speedtouch modem at startup; this
works fine, but it takes some time to load the microcode.
I wonder if it's possible to do this in a script that runs at the
background? (that way the process of booting can continue instead of
waiting for the initialization of the modem to complete)
And how do I start such a script?
Thanks in advance,
Erik
| |
| Alfred Frank 2002-09-27, 12:29 pm |
| Erik Boerstoel wrote:
[...]
> And how do I start such a script?
[...]
Start the script with an ampersand:
# script &
--
MfG Alfred Frank, Wien.
| |
| Alfred Frank 2002-09-27, 1:29 pm |
| Erik Boerstoel wrote:
[...]
> And how do I start such a script?
[...]
Start the script with an ampersand:
# script &
--
MfG Alfred Frank, Wien.
| |
|
| On Fri, 27 Sep 2002 19:44:46 +0200, Alfred Frank wrote:
> Erik Boerstoel wrote:
> [...]
>> And how do I start such a script?
> [...]
>
> Start the script with an ampersand:
> # script &
Or prepend a nohup
then forget about it?
| |
|
| On Fri, 27 Sep 2002 19:44:46 +0200, Alfred Frank wrote:
> Erik Boerstoel wrote:
> [...]
>> And how do I start such a script?
> [...]
>
> Start the script with an ampersand:
> # script &
Or prepend a nohup
then forget about it?
| |
| MeltDown 2002-09-27, 3:29 pm |
| > Or prepend a nohup
> then forget about it?
If you prepend 'nohup', it will _not_ run in the background. It will just
keep running when the controlling terminal closed. You still need to append
'&' for that, unless the program forks itself.
Sybren
| |
|
| On Fri, 27 Sep 2002 22:33:20 +0200, MeltDown wrote:
>> Or prepend a nohup
>> then forget about it?
>
> If you prepend 'nohup', it will _not_ run in the background. It will just
> keep running when the controlling terminal closed. You still need to append
> '&' for that, unless the program forks itself.
>
> Sybren
I know
| |
| Erik Boerstoel 2002-09-27, 3:29 pm |
| Alfred Frank wrote:
> Erik Boerstoel wrote:
> [...]
>
>>And how do I start such a script?
>>
> [...]
>
> Start the script with an ampersand:
> # script &
>
Thanks, I've tried this, but unfortunately, it doesn't work.. If I call
my script in the initialization script /etc/rc.d/rc.local, then:
- it does work if it my script does NOT run in the background
- it does NOT work if my script runs in the background
Can anyone explain this to me?
Here's some more info:
The line added to /etc/rc.d/rc.local is (if it runs in the background):
.. /usr/share/speedtouch/init_and_start_adsl.sh&
And my script (thus called init_and_start_adsl.sh), contains the
following two lines:
modem -f /usr/share/speedtouch/mgmt.o -m
pppd call adsl
It struck me that /etc/rc.d/rclocal is executed BEFORE the X-windows
starts (automatically, I use auto login). Could this erase or mess
things up?!?
Cheers,
Erik
| |
| MeltDown 2002-09-27, 4:29 pm |
| > Or prepend a nohup
> then forget about it?
If you prepend 'nohup', it will _not_ run in the background. It will just
keep running when the controlling terminal closed. You still need to append
'&' for that, unless the program forks itself.
Sybren
| |
|
| On Fri, 27 Sep 2002 22:33:20 +0200, MeltDown wrote:
>> Or prepend a nohup
>> then forget about it?
>
> If you prepend 'nohup', it will _not_ run in the background. It will just
> keep running when the controlling terminal closed. You still need to append
> '&' for that, unless the program forks itself.
>
> Sybren
I know
| |
| Erik Boerstoel 2002-09-27, 4:29 pm |
| Alfred Frank wrote:
> Erik Boerstoel wrote:
> [...]
>
>>And how do I start such a script?
>>
> [...]
>
> Start the script with an ampersand:
> # script &
>
Thanks, I've tried this, but unfortunately, it doesn't work.. If I call
my script in the initialization script /etc/rc.d/rc.local, then:
- it does work if it my script does NOT run in the background
- it does NOT work if my script runs in the background
Can anyone explain this to me?
Here's some more info:
The line added to /etc/rc.d/rc.local is (if it runs in the background):
.. /usr/share/speedtouch/init_and_start_adsl.sh&
And my script (thus called init_and_start_adsl.sh), contains the
following two lines:
modem -f /usr/share/speedtouch/mgmt.o -m
pppd call adsl
It struck me that /etc/rc.d/rclocal is executed BEFORE the X-windows
starts (automatically, I use auto login). Could this erase or mess
things up?!?
Cheers,
Erik
| |
| Sybren Stuvel 2002-09-27, 4:29 pm |
| dmz17 wrote:
> I know
Then why are you giving the poor sod misleading information?
| |
| Giannis Georgalis 2002-09-27, 4:29 pm |
| Erik Boerstoel <epboerstoel@planet.nl> writes:
> The line added to /etc/rc.d/rc.local is (if it runs in the background):
>
> . /usr/share/speedtouch/init_and_start_adsl.sh&
NO! write:
". /usr/share/speedtouch/init_and_start_adsl.sh"
....and then in your init_and_start_adsl.sh file:
> And my script (thus called init_and_start_adsl.sh), contains the
> following two lines:
>
> modem -f /usr/share/speedtouch/mgmt.o -m
> pppd call adsl
modem -f /usr/share/speedtouch/mgmt.o -m
pppd call adsl &
--
int main(void){int j=1234;/*(c)2002 jgeorgal */
char t[] ="<G> @abcdefghijklmnopqrstuvwxyz.\n";
char*i ="qhui<xfi.df rwgzfizjz.f rwgqqwqtigiz";
while(*i)((j+=strchr(t,*i++)-(int)t),(j%=sizeof
t-1),(putchar(t[j])));return 0;}/* under GPL */
| |
| Sybren Stuvel 2002-09-27, 5:29 pm |
| dmz17 wrote:
> I know
Then why are you giving the poor sod misleading information?
| |
| Giannis Georgalis 2002-09-27, 5:29 pm |
| Erik Boerstoel <epboerstoel@planet.nl> writes:
> The line added to /etc/rc.d/rc.local is (if it runs in the background):
>
> . /usr/share/speedtouch/init_and_start_adsl.sh&
NO! write:
". /usr/share/speedtouch/init_and_start_adsl.sh"
....and then in your init_and_start_adsl.sh file:
> And my script (thus called init_and_start_adsl.sh), contains the
> following two lines:
>
> modem -f /usr/share/speedtouch/mgmt.o -m
> pppd call adsl
modem -f /usr/share/speedtouch/mgmt.o -m
pppd call adsl &
--
int main(void){int j=1234;/*(c)2002 jgeorgal */
char t[] ="<G> @abcdefghijklmnopqrstuvwxyz.\n";
char*i ="qhui<xfi.df rwgzfizjz.f rwgqqwqtigiz";
while(*i)((j+=strchr(t,*i++)-(int)t),(j%=sizeof
t-1),(putchar(t[j])));return 0;}/* under GPL */
| |
| Erik Boerstoel 2002-09-27, 5:29 pm |
| Giannis Georgalis wrote:
> Erik Boerstoel <epboerstoel@planet.nl> writes:
>
>>The line added to /etc/rc.d/rc.local is (if it runs in the background):
>>
>>. /usr/share/speedtouch/init_and_start_adsl.sh&
>>
>
> NO! write:
>
> ". /usr/share/speedtouch/init_and_start_adsl.sh"
>
> ...and then in your init_and_start_adsl.sh file:
>
>
>>And my script (thus called init_and_start_adsl.sh), contains the
>>following two lines:
>>
>>modem -f /usr/share/speedtouch/mgmt.o -m
>>pppd call adsl
>>
>
> modem -f /usr/share/speedtouch/mgmt.o -m
> pppd call adsl &
>
Thanks for your reply. This works, but doesn't really speed up the
process of booting. The problem is: it takes a lot of time to complete
the command (this loads the microcode in the modem):
modem -f /usr/share/speedtouch/mgmt.o -m
So I would like to run this command in the background. I have added the
& to this command as well, but that doesn't work, the microcode didn't
load (so the command became 'modem -f /usr/share/speedtouch/mgmt.o -m &').
So you cannot load the microcode in the background?!?
Does anybody have any experience with getting the Alcatel Speedtouch on
the run at startup?
Regards,
Erik
| |
| Erik Boerstoel 2002-09-27, 5:29 pm |
| dmz17 wrote:
> On Fri, 27 Sep 2002 19:44:46 +0200, Alfred Frank wrote:
>
>
>>Erik Boerstoel wrote:
>>[...]
>>
>>>And how do I start such a script?
>>>
>>[...]
>>
>>Start the script with an ampersand:
>># script &
>>
>
> Or prepend a nohup
>
> then forget about it?
>
Eh...sorry, perhaps it's my lack of knowledge of the English language..,
what is 'prepend' and what do you mean by 'nohup'?
Erik
| |
| Giannis Georgalis 2002-09-27, 5:29 pm |
| Erik Boerstoel <epboerstoel@planet.nl> writes:
> > pppd call adsl &
> >
>
> Thanks for your reply. This works, but doesn't really speed up the
> process of booting. The problem is: it takes a lot of time to complete
> the command (this loads the microcode in the modem):
>
> modem -f /usr/share/speedtouch/mgmt.o -m
try this:
(modem -f /usr/share/speedtouch/mgmt.o -m && pppd call adsl) &> /dev/null &
....and if it still does not work change it to:
(modem -f /usr/share/speedtouch/mgmt.o -m && pppd call adsl) &> /home/my_debug_file &
and send the contents of the "my_debug_file".
I hope it helps...
--
int main(void){int j=1234;/*(c)2002 jgeorgal */
char t[] ="<G> @abcdefghijklmnopqrstuvwxyz.\n";
char*i ="qhui<xfi.df rwgzfizjz.f rwgqqwqtigiz";
while(*i)((j+=strchr(t,*i++)-(int)t),(j%=sizeof
t-1),(putchar(t[j])));return 0;}/* under GPL */
| |
| Joachim Feise 2002-09-27, 8:29 pm |
| Erik Boerstoel wrote:
> dmz17 wrote:
>
>> On Fri, 27 Sep 2002 19:44:46 +0200, Alfred Frank wrote:
>>
>>
>>> Erik Boerstoel wrote:
>>> [...]
>>>
>>>> And how do I start such a script?
>>>>
>>> [...]
>>>
>>> Start the script with an ampersand:
>>> # script &
>>>
>>
>> Or prepend a nohup
>>
>> then forget about it?
>>
>
> Eh...sorry, perhaps it's my lack of knowledge of the English language..,
> what is 'prepend' and what do you mean by 'nohup'?
Prepend means to put in front of the command. The opposite of append.
nohup is explained in man nohup.
But nohup wouldn't help, since it still waits for the command to finish.
The ampersand is used to execute a command in the background.
-Joe
| |
| Joachim Feise 2002-09-27, 9:29 pm |
| Erik Boerstoel wrote:
> dmz17 wrote:
>
>> On Fri, 27 Sep 2002 19:44:46 +0200, Alfred Frank wrote:
>>
>>
>>> Erik Boerstoel wrote:
>>> [...]
>>>
>>>> And how do I start such a script?
>>>>
>>> [...]
>>>
>>> Start the script with an ampersand:
>>> # script &
>>>
>>
>> Or prepend a nohup
>>
>> then forget about it?
>>
>
> Eh...sorry, perhaps it's my lack of knowledge of the English language..,
> what is 'prepend' and what do you mean by 'nohup'?
Prepend means to put in front of the command. The opposite of append.
nohup is explained in man nohup.
But nohup wouldn't help, since it still waits for the command to finish.
The ampersand is used to execute a command in the background.
-Joe
| |
| Erik Boerstoel 2002-09-28, 4:29 am |
| > try this:
>
> (modem -f /usr/share/speedtouch/mgmt.o -m && pppd call adsl) &> /dev/null &
>
> ...and if it still does not work change it to:
>
> (modem -f /usr/share/speedtouch/mgmt.o -m && pppd call adsl) &> /home/my_debug_file &
>
> and send the contents of the "my_debug_file".
>
> I hope it helps...
>
>
Thanks again! I succeeded in running the modem by entering:
(modem -f /usr/share/speedtouch/mgmt.o -m && pppd call adsl) > /dev/null &
in the script.
Note that I have omitted the ampersand before /dev/null, two ampersands
do not work.
Nevertheless I would to know WHAT this command does..
Am I right that 'modem -f /usr/share/speedtouch/mgmt.o -m' is executed
BEFORE pppd call adsl and that pppd call adsl is not executed until
modem -f etc. has been finished? What does && exactly mean in a script?
Cheers,
Erik
| |
| Erik Boerstoel 2002-09-28, 5:28 am |
| > try this:
>
> (modem -f /usr/share/speedtouch/mgmt.o -m && pppd call adsl) &> /dev/null &
>
> ...and if it still does not work change it to:
>
> (modem -f /usr/share/speedtouch/mgmt.o -m && pppd call adsl) &> /home/my_debug_file &
>
> and send the contents of the "my_debug_file".
>
> I hope it helps...
>
>
Thanks again! I succeeded in running the modem by entering:
(modem -f /usr/share/speedtouch/mgmt.o -m && pppd call adsl) > /dev/null &
in the script.
Note that I have omitted the ampersand before /dev/null, two ampersands
do not work.
Nevertheless I would to know WHAT this command does..
Am I right that 'modem -f /usr/share/speedtouch/mgmt.o -m' is executed
BEFORE pppd call adsl and that pppd call adsl is not executed until
modem -f etc. has been finished? What does && exactly mean in a script?
Cheers,
Erik
| |
|
| On Sat, 28 Sep 2002 12:13:19 +0100, Erik Boerstoel wrote:
>
> Note that I have omitted the ampersand before /dev/null, two ampersands
> do not work.
> Nevertheless I would to know WHAT this command does..
>
> Am I right that 'modem -f /usr/share/speedtouch/mgmt.o -m' is executed
> BEFORE pppd call adsl and that pppd call adsl is not executed until
> modem -f etc. has been finished? What does && exactly mean in a script?
>
> Cheers,
>
> Erik
According to man bash:
The control operators && and || denote AND lists and OR lists,
respectively. An AND list has the form
command1 && command2
command2 is executed if, and only if,
command1 returns an exit status of zero.
Cheers,
dmz17
| |
|
| On Sat, 28 Sep 2002 12:13:19 +0100, Erik Boerstoel wrote:
>
> Note that I have omitted the ampersand before /dev/null, two ampersands
> do not work.
> Nevertheless I would to know WHAT this command does..
>
> Am I right that 'modem -f /usr/share/speedtouch/mgmt.o -m' is executed
> BEFORE pppd call adsl and that pppd call adsl is not executed until
> modem -f etc. has been finished? What does && exactly mean in a script?
>
> Cheers,
>
> Erik
According to man bash:
The control operators && and || denote AND lists and OR lists,
respectively. An AND list has the form
command1 && command2
command2 is executed if, and only if,
command1 returns an exit status of zero.
Cheers,
dmz17
| |
| Giannis Georgalis 2002-09-28, 7:29 am |
| Erik Boerstoel <epboerstoel@planet.nl> writes:
> Thanks again! I succeeded in running the modem by entering:
>
> (modem -f /usr/share/speedtouch/mgmt.o -m && pppd call adsl) > /dev/null &
You're welcome.
the parentheses run the command on a subshell, "&&" is the logical AND
operator (so the rightmost command is executed if and only if the
previous one succeeds), and "&>" redirects /dev/stdout AND /dev/stderr
to the "backup device( )" called /dev/null. Note that ">" redirects
only the /dev/stdout.
> Note that I have omitted the ampersand before /dev/null, two
> ampersands do not work.
It should work (see above). Are you executing the start-up scripts
with an sh-incopatible shell?
> Nevertheless I would to know WHAT this command does..
--
int main(void){int j=1234;/*(c)2002 jgeorgal */
char t[] ="<G> @abcdefghijklmnopqrstuvwxyz.\n";
char*i ="qhui<xfi.df rwgzfizjz.f rwgqqwqtigiz";
while(*i)((j+=strchr(t,*i++)-(int)t),(j%=sizeof
t-1),(putchar(t[j])));return 0;}/* under GPL */
| |
| Giannis Georgalis 2002-09-28, 8:28 am |
| Erik Boerstoel <epboerstoel@planet.nl> writes:
> Thanks again! I succeeded in running the modem by entering:
>
> (modem -f /usr/share/speedtouch/mgmt.o -m && pppd call adsl) > /dev/null &
You're welcome.
the parentheses run the command on a subshell, "&&" is the logical AND
operator (so the rightmost command is executed if and only if the
previous one succeeds), and "&>" redirects /dev/stdout AND /dev/stderr
to the "backup device( )" called /dev/null. Note that ">" redirects
only the /dev/stdout.
> Note that I have omitted the ampersand before /dev/null, two
> ampersands do not work.
It should work (see above). Are you executing the start-up scripts
with an sh-incopatible shell?
> Nevertheless I would to know WHAT this command does..
--
int main(void){int j=1234;/*(c)2002 jgeorgal */
char t[] ="<G> @abcdefghijklmnopqrstuvwxyz.\n";
char*i ="qhui<xfi.df rwgzfizjz.f rwgqqwqtigiz";
while(*i)((j+=strchr(t,*i++)-(int)t),(j%=sizeof
t-1),(putchar(t[j])));return 0;}/* under GPL */
| |
| Sybren 2002-09-28, 9:29 am |
| > Does anybody have any experience with getting the Alcatel Speedtouch on
> the run at startup?
Well, looking at your name, you seem to be Dutch. So I assume you're using
MxStream in combination with an Alcatel Speedtouch Home modem. The easiest
way to use this modem under Linux, is to hack it into a Pro modem, and drop
the loading of the microcode and pptp alltogether.
Info about hacking the modem can be found at
http://www.sateh.com/hacks/alcatel.php. Don't worry, I've done it on
multiple modems (both for analog and ISDN lines), and it works like a
charm. See www.unrealtower.org, it's hosted on a XS4ALL ADSL modem ;-)
Greetz,
Sybren
| |
| Peter T. Breuer 2002-09-28, 9:29 am |
| Erik Boerstoel <epboerstoel@planet.nl> wrote:
>> try this:
>>
>> (modem -f /usr/share/speedtouch/mgmt.o -m && pppd call adsl) &> /dev/null &
There should be more spaces in this (depending on your shell).
>> ...and if it still does not work change it to:
>>
>> (modem -f /usr/share/speedtouch/mgmt.o -m && pppd call adsl) &> /home/my_debug_file &
>>
>> and send the contents of the "my_debug_file".
The magic formula usually goes "2>&1 >/dev/null" and not "&>
/dev/null", which might well be a newism or a cshism, but is unknown to
me!
> Thanks again! I succeeded in running the modem by entering:
> (modem -f /usr/share/speedtouch/mgmt.o -m && pppd call adsl) > /dev/null &
This just forgets the stderr, if that was the intention. Mind you, I
would have not recognized "&>" myself as a valid construction. It
depends on your shell. I would have used "2>&1 >".
> Note that I have omitted the ampersand before /dev/null, two ampersands
There was no ampersand. You substituted "&>" by ">". If you were trying
to replace a dubious construction by a sure one, you should have used
"2>&1 >".
> do not work.
> Nevertheless I would to know WHAT this command does..
Eh? Only you know what the commands do. The constructors are pure
shell.
> Am I right that 'modem -f /usr/share/speedtouch/mgmt.o -m' is executed
> BEFORE pppd call adsl and that pppd call adsl is not executed until
> modem -f etc. has been finished? What does && exactly mean in a script?
&& means "and then". Just as in most languages.
Peter
| |
| Sybren 2002-09-28, 10:29 am |
| > Does anybody have any experience with getting the Alcatel Speedtouch on
> the run at startup?
Well, looking at your name, you seem to be Dutch. So I assume you're using
MxStream in combination with an Alcatel Speedtouch Home modem. The easiest
way to use this modem under Linux, is to hack it into a Pro modem, and drop
the loading of the microcode and pptp alltogether.
Info about hacking the modem can be found at
http://www.sateh.com/hacks/alcatel.php. Don't worry, I've done it on
multiple modems (both for analog and ISDN lines), and it works like a
charm. See www.unrealtower.org, it's hosted on a XS4ALL ADSL modem ;-)
Greetz,
Sybren
| |
| Peter T. Breuer 2002-09-28, 10:29 am |
| Erik Boerstoel <epboerstoel@planet.nl> wrote:
>> try this:
>>
>> (modem -f /usr/share/speedtouch/mgmt.o -m && pppd call adsl) &> /dev/null &
There should be more spaces in this (depending on your shell).
>> ...and if it still does not work change it to:
>>
>> (modem -f /usr/share/speedtouch/mgmt.o -m && pppd call adsl) &> /home/my_debug_file &
>>
>> and send the contents of the "my_debug_file".
The magic formula usually goes "2>&1 >/dev/null" and not "&>
/dev/null", which might well be a newism or a cshism, but is unknown to
me!
> Thanks again! I succeeded in running the modem by entering:
> (modem -f /usr/share/speedtouch/mgmt.o -m && pppd call adsl) > /dev/null &
This just forgets the stderr, if that was the intention. Mind you, I
would have not recognized "&>" myself as a valid construction. It
depends on your shell. I would have used "2>&1 >".
> Note that I have omitted the ampersand before /dev/null, two ampersands
There was no ampersand. You substituted "&>" by ">". If you were trying
to replace a dubious construction by a sure one, you should have used
"2>&1 >".
> do not work.
> Nevertheless I would to know WHAT this command does..
Eh? Only you know what the commands do. The constructors are pure
shell.
> Am I right that 'modem -f /usr/share/speedtouch/mgmt.o -m' is executed
> BEFORE pppd call adsl and that pppd call adsl is not executed until
> modem -f etc. has been finished? What does && exactly mean in a script?
&& means "and then". Just as in most languages.
Peter
| |
| Giannis Georgalis 2002-09-28, 11:29 am |
| "Peter T. Breuer" <ptb@oboe.it.uc3m.es> writes:
> The magic formula usually goes "2>&1 >/dev/null" and not "&>
> /dev/null", which might well be a newism or a cshism, but is unknown to
> me!
From the bash manual:
Redirecting Standard Output and Standard Error
Bash allows both the standard output (file descriptor 1)
and the standard error output (file descriptor 2) to be
redirected to the file whose name is the expansion of word
with this construct.
There are two formats for redirecting standard output and
standard error:
&>word
and
>&word
Of the two forms, the first is preferred. This is seman_
tically equivalent to
>word 2>&1
--
int main(void){int j=1234;/*(c)2002 jgeorgal */
char t[] ="<G> @abcdefghijklmnopqrstuvwxyz.\n";
char*i ="qhui<xfi.df rwgzfizjz.f rwgqqwqtigiz";
while(*i)((j+=strchr(t,*i++)-(int)t),(j%=sizeof
t-1),(putchar(t[j])));return 0;}/* under GPL */
| |
| Erik Boerstoel 2002-09-28, 11:29 am |
| Hi Sybren,
Sybren wrote:
>>Does anybody have any experience with getting the Alcatel Speedtouch on
>>the run at startup?
>>
>
> Well, looking at your name, you seem to be Dutch. So I assume you're using
> MxStream in combination with an Alcatel Speedtouch Home modem. The easiest
> way to use this modem under Linux, is to hack it into a Pro modem, and drop
> the loading of the microcode and pptp alltogether.
>
You are 100% correct, I use MxStream and I live in the Netherlands.
> Info about hacking the modem can be found at
> http://www.sateh.com/hacks/alcatel.php. Don't worry, I've done it on
> multiple modems (both for analog and ISDN lines), and it works like a
> charm. See www.unrealtower.org, it's hosted on a XS4ALL ADSL modem ;-)
>
Interesting.. of course, I am curious what the advantage of speedtouch
pro would be.
I've taken a look at
http://www.speedtouchdsl.com/
but that didn't help me. So is there any advantage? Is a speedtouch pro
only another driver or so ?
Cheers,
Erik
> Greetz,
> Sybren
>
>
| |
| Giannis Georgalis 2002-09-28, 12:29 pm |
| "Peter T. Breuer" <ptb@oboe.it.uc3m.es> writes:
> The magic formula usually goes "2>&1 >/dev/null" and not "&>
> /dev/null", which might well be a newism or a cshism, but is unknown to
> me!
From the bash manual:
Redirecting Standard Output and Standard Error
Bash allows both the standard output (file descriptor 1)
and the standard error output (file descriptor 2) to be
redirected to the file whose name is the expansion of word
with this construct.
There are two formats for redirecting standard output and
standard error:
&>word
and
>&word
Of the two forms, the first is preferred. This is seman_
tically equivalent to
>word 2>&1
--
int main(void){int j=1234;/*(c)2002 jgeorgal */
char t[] ="<G> @abcdefghijklmnopqrstuvwxyz.\n";
char*i ="qhui<xfi.df rwgzfizjz.f rwgqqwqtigiz";
while(*i)((j+=strchr(t,*i++)-(int)t),(j%=sizeof
t-1),(putchar(t[j])));return 0;}/* under GPL */
| |
| Erik Boerstoel 2002-09-28, 12:29 pm |
| Hi Sybren,
Sybren wrote:
>>Does anybody have any experience with getting the Alcatel Speedtouch on
>>the run at startup?
>>
>
> Well, looking at your name, you seem to be Dutch. So I assume you're using
> MxStream in combination with an Alcatel Speedtouch Home modem. The easiest
> way to use this modem under Linux, is to hack it into a Pro modem, and drop
> the loading of the microcode and pptp alltogether.
>
You are 100% correct, I use MxStream and I live in the Netherlands.
> Info about hacking the modem can be found at
> http://www.sateh.com/hacks/alcatel.php. Don't worry, I've done it on
> multiple modems (both for analog and ISDN lines), and it works like a
> charm. See www.unrealtower.org, it's hosted on a XS4ALL ADSL modem ;-)
>
Interesting.. of course, I am curious what the advantage of speedtouch
pro would be.
I've taken a look at
http://www.speedtouchdsl.com/
but that didn't help me. So is there any advantage? Is a speedtouch pro
only another driver or so ?
Cheers,
Erik
> Greetz,
> Sybren
>
>
| |
| Sybren 2002-09-28, 12:29 pm |
| Erik Boerstoel wrote:
> Interesting.. of course, I am curious what the advantage of speedtouch
> pro would be.
The major advantage, is that you will only need dhcp to connect to the
internet. Let's say your NIC connecting to your modem is eth1. A connection
is then made like this:
- dhcpcd (DHCP Client Daemon) asks for an IP-address on eth1
- modem receives this request, and connects to MXStream
- modem receives IP-address from MXStream
- and passes it on to dhcpcd.
- eth1 will now have your external IP-address, ie. 80.60.96.82
Another advantage is that this way, all traffic is routed to your server,
and your server thinks it's directly connected to the internet, instead of
through a modem hooked up on 10.0.0.138.
Sybren
| |
| Sybren 2002-09-28, 1:29 pm |
| Erik Boerstoel wrote:
> Interesting.. of course, I am curious what the advantage of speedtouch
> pro would be.
The major advantage, is that you will only need dhcp to connect to the
internet. Let's say your NIC connecting to your modem is eth1. A connection
is then made like this:
- dhcpcd (DHCP Client Daemon) asks for an IP-address on eth1
- modem receives this request, and connects to MXStream
- modem receives IP-address from MXStream
- and passes it on to dhcpcd.
- eth1 will now have your external IP-address, ie. 80.60.96.82
Another advantage is that this way, all traffic is routed to your server,
and your server thinks it's directly connected to the internet, instead of
through a modem hooked up on 10.0.0.138.
Sybren
| |
| Peter T. Breuer 2002-09-28, 1:29 pm |
| Giannis Georgalis <compile-sig@spam.com> wrote:
> "Peter T. Breuer" <ptb@oboe.it.uc3m.es> writes:
>> The magic formula usually goes "2>&1 >/dev/null" and not "&>
>> /dev/null", which might well be a newism or a cshism, but is unknown to
>> me!
> There are two formats for redirecting standard output and
> standard error:
> &>word
> and
> >&word
> Of the two forms, the first is preferred. This is seman
> tically equivalent to
> >word 2>&1
I stand corrected (and informed). It is valid and standard bash syntax.
And note that I should have said ">/dev/null 2>&1" (redirect stdout,
then dup stdout to stderr).
Peter
| |
| Peter T. Breuer 2002-09-28, 2:29 pm |
| Giannis Georgalis <compile-sig@spam.com> wrote:
> "Peter T. Breuer" <ptb@oboe.it.uc3m.es> writes:
>> The magic formula usually goes "2>&1 >/dev/null" and not "&>
>> /dev/null", which might well be a newism or a cshism, but is unknown to
>> me!
> There are two formats for redirecting standard output and
> standard error:
> &>word
> and
> >&word
> Of the two forms, the first is preferred. This is seman
> tically equivalent to
> >word 2>&1
I stand corrected (and informed). It is valid and standard bash syntax.
And note that I should have said ">/dev/null 2>&1" (redirect stdout,
then dup stdout to stderr).
Peter
|
|
|
|
|