ksh : Need to delete multiple directories in parallel

Posted by priya on Stack Overflow See other posts from Stack Overflow or by priya
Published on 2010-05-05T11:55:02Z Indexed on 2010/05/05 11:58 UTC
Read the original article Hit count: 287

Filed under:
|
|
|
|

Hi , I have many directories and need to delete them periodically with minimum time. Additionally for each directories delete status need to know i.e whether deleted successfully or not. I need to write on the ksh . Could you please help me out.

The sample code which I am using is not working.

for var1 in 1...10 rm -rf & pid[var1]=$! done

my_var=1 for my_var in 1...var1 wait $pid[my_var] if [ $? -eq 1 ] then echo falied else echo passed fi done

© Stack Overflow or respective owner

Related posts about ksh

Related posts about rm