DATA_DIR=/home/liupan/.navinsight/data/dataset_rec SHELL_DIR=/home/liupan/workspace/nvi_postprocessing/install/shells for i in $(ls -a $DATA_DIR) do status=$(cat $DATA_DIR/$i/info.yaml | grep "status" | awk '{print $2}') if [ $status = "processed" ] then bash $SHELL_DIR/PostProcessing.sh $i fi status=$(cat $DATA_DIR/$i/info.yaml | grep "status" | awk '{print $2}') if [ $status = "post_process_complete" ] then bash $SHELL_DIR/WebProcessing.sh $i fi done
以上代码可以对data_dir目录下的所有dataset进行批处理