WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TinyCore infinite loop BASH command ?  (Read 1650 times)

Offline mbzadegan

  • Newbie
  • *
  • Posts: 33
TinyCore infinite loop BASH command ?
« 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 ... :)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: TinyCore infinite loop BASH command ?
« Reply #1 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.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline mbzadegan

  • Newbie
  • *
  • Posts: 33
Re: TinyCore infinite loop BASH command ?
« Reply #2 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 ?
« Last Edit: February 22, 2011, 04:35:25 AM by mbzadegan »

Offline SvOlli

  • Full Member
  • ***
  • Posts: 193
  • Linux Developer
Re: TinyCore infinite loop BASH command ?
« Reply #3 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

Offline mbzadegan

  • Newbie
  • *
  • Posts: 33
TinyCore infinite loop BASH command ?
« Reply #4 on: February 22, 2011, 05:08:49 AM »
WELL , this work excellent , Thanks  :)