On Mon, 2003-03-24 at 12:43, Gabriel L. Briones III wrote:
> 
> You can appreciate the power of wait command if you are sending jobs in the
> background
> 
> consider the scripts below
> 
>     #!/bin/sh
>         updatedb &
>         wait
>         locate <put desired files here>
> 

ok, please correct me if i'm wrong.

1) if you do this in your shell script:

        #!/bin/sh
                updatedb
                locate (the file you're looking for)

it means that wait until updatedb finishes and then run locate.

2) if you do this in your shell script:
        #!/bin
                updatedb &
                locate (the file you're looking for)

will run updatedb in the background, then proceed to locate.

now, if you want to sequentially run the commands, then you don't need
to run updatedb in the background and just do the thing in 1).

-- 
-=[mikhail]=-

aka Dean Michael C. Berris
mobile +63 917 8901959
work +63 49 5680024
http://free.net.ph/Members/mikhailberis

_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Fully Searchable Archives With Friendly Web Interface at http://marc.free.net.ph

To subscribe to the Linux Newbies' List: send "subscribe" in the body to [EMAIL 
PROTECTED]

Reply via email to