or, I could just use the first two lines and repeat them somehow. Is there a simple string that I can add to the bottom of a script to say "return to top line and repeat" so that the script will run forever?

I have a slideshow code which displays random (*) images, and since there is always another random image it continues on..._________________Close the Windows, and open your eyes, to a whole new world
http://puppylinuxstuff.meownplanet.net/puppyluvr/
Puppy Linux Users Group on Facebook
Puppy since 2.15CE...

btw ":" is a shortcut to true and also a useful way to make inline comments
also there should be an example in the xdotool thread that I wrote months ago that was designed to intentionally shake the mouse randomly to be annoying

ex.
printf "hello";: cruel;echo world

which is not the best example it is more useful when you have a long pipe and want to make comments

but really most of the really long pipes you come across could be reimplemented much faster in a couple lines of awk (learn shell first though ... it will help)_________________Web Programming - Pet Packaging 100 & 101

A while or until loop needs to be programmed with some sleep lines as stated above. Otherwise they would run inside commands as fast as possible, heating up your cpu.

Code:

until [ "`pidof poweroff`" -o "`pidof reboot`" ]; do
yes
done

Explaination :
* until tests for existence of a process-id of poweroff -or reboot. Until one of these two appear it runs the
* yes command, that printfs 'y' into the terminal or standard output?error as much as the cpu can deliver.
* done closes the do command.

Explaination :
* xwininfo -root gives the current screen resolution ie -geometry 1280x1024+0+0
* MAX_XY are the maximum values formatted using bash string manipulation
* while test for the existence of a process-id of X. If there is a X-PID
* count is set zero
* do
* count increases by 10 each do loop
* xdotool whatever variable count variable count should move the cursor then from upper left to bottom right
* sleep five seconds to give you some chance to move the mouse and not occupying the whole cpu
* if tests if the cursor still would fit into the screen, if not resets the count variable to 0
* done ends the commands in the do loop._________________«Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal

How easy is it to explain what you mean by the "fork bomb". Can you clarify the danger you refer to or if I google it will I be likely to find the explanation (without drawing the attention of Echelon and Homeland Security)?

How easy is it to explain what you mean by the "fork bomb". Can you clarify the danger you refer to or if I google it will I be likely to find the explanation (without drawing the attention of Echelon and Homeland Security)?

No danger - it's in Wikipedia: http://en.wikipedia.org/wiki/Fork_bomb
Basically it's a nice looking one-liner, which multiplies itself (or rather its own process) ad infinitum, what makes system completely freezed.
Sadly, Puppy isn't immune for that kind of attack...

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 vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum