View Full Version : Repeat?

December 2nd, 2009, 08:33 PM
What's Up?

OK, So I've been making a script in terminal and have finally ran into a wall, Basically at the end of the script i want it to go right back to the top and start again. Like the MS DOS goto command.

Anyone know?

Thanks Bye.

December 2nd, 2009, 09:10 PM
2 Shorthand at the Command Prompt

Some of these are specific to the bash shell. I have not experimented enough with other shells to know which are common to all shells. See also the ``Bash Reference Card'', SSC (2000), available online.

/ - root directory
./ - current directory
./command_name - run a command in the current directory when the current directory is not on the path
../ - parent directory
~ - home directory
$ - typical prompt when logged in as ordinary user
# - typical prompt when logged in as root or superuser
! - repeat specified command
!! - repeat previous command
^^ - repeat previous command with substitution
& - run a program in background mode

December 2nd, 2009, 09:34 PM
while [ 1 ]
# Instructions

Alternatively you could use a function which depending on the outcome would call itself again and again until you tell it to stop.