Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: mbzadegan on February 22, 2011, 03:15:40 AM

Title: TinyCore infinite loop BASH command ?
Post by: mbzadegan on February 22, 2011, 03:15:40 AM
Hi,
I try to Run one line bash command ( such as LS ) on tiny core but get an error

for ((;;));do ls ;done

Note : i run it on other Distros and do well !!

Thanks for helping me ... :)
Title: Re: TinyCore infinite loop BASH command ?
Post by: tinypoodle on February 22, 2011, 04:06:16 AM
Did you explicitely run it in a bash shell?
The other distros you refer to might have bash as default shell.
Title: Re: TinyCore infinite loop BASH command ?
Post by: mbzadegan on February 22, 2011, 04:33:43 AM
yes , my other distros have bash and i need to run infinite loop in tiny core .
How can i run a line command on a loop in tiny core ?
Title: Re: TinyCore infinite loop BASH command ?
Post by: SvOlli on February 22, 2011, 04:40:41 AM
Try the following, it should work on any Bourne shell, like bash and busybox ash:
Code: [Select]
while true ; do ls -l ; done
But this will very likely create a heavy load on the system. If you don't want this, you should try:
Code: [Select]
while sleep 1 ; do ls -l ; done
Title: TinyCore infinite loop BASH command ?
Post by: mbzadegan on February 22, 2011, 05:08:49 AM
WELL , this work excellent , Thanks  :)