#!/bin/bash

data_root="/hildafs/datasets/Asterix/PIG2"
output_root="/hildafs/datasets/public/ASTRID/compressed_files"

for i in 483 658; do
	data_dir="$data_root/PIG_${i}_subfind"
	output_dir1="$output_root/PIG_${i}_subfind"
    output_dir2="$output_root/PIG_$i"
	cd $data_dir/0
	for column in $(ls -d */ | cut -f1 -d'/'); do
        echo $column
		mv "$output_dir1/0/$column.tar" "$output_dir2/PIG_${i}_0_${column}.tar"
	done	

done
