From: Corey Jewett Date: 2005-10-17T15:38:31+09:00 Subject: Re: starting a process after the previous one is done I'm a complete noob too, but can't you just: #!/usr/local/bin/ruby -W print "Start\n" system("ls -lrt /home/xyz > 1f") system("touch 1f_after") Corey On Oct 16, 2005, at 23:31, Partha wrote: > I am a RUBY NUBY. > > Was trying to use ruby to automate a set of tasks. > In trying to do so I need process2 to start only after process1 is > done. > I am using a code similar to below, but does not seem to work. > > I want the process 1f_after to execute after the exec command is done. > So I would expect that the time stamp of "1f_after" is later than the > time stamp of "1f" but does not happen so. > > How could I do this? > (process2 & process1 are not necessarily system commands I am trying to > executea part of a cad tool in process1 & 2) > > Thankyou, > Partha > > > > #!/usr/local/bin/ruby -W > > print "Start\n" > exec("ls -lrt /home/xyz > 1f") if fork == nil > Process.wait > system("touch 1f_after") > >