|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|
Re: [PLUG] can i fork a process in the bash shell?
|
> Specifically, I want to kick off a delete of a huge directory and in the mean time interact with the user a bit more. Only when i know the delete is complete I want to continue doing the rest of the script actions.
>
> I don't know how to pull that off in bash. Any help would be appreciated.
OK, you can do something like: rm -rf /path/to/evildir &
Then interact, finally do a while (! `ps aux | grep "rm -rvf
/path/to/evildir")
do
#do nothing
done
#stuff to do when evil dir is gone
You need to figure out exact syntax b/c my bash is rusty since I learned
perl.
good luck,
Fred
______________________________________________________________________
Philadelphia Linux Users Group - http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion - http://lists.phillylinux.org/mail/listinfo/plug
|
|