benchmark_mps/data_process/file_process_north.bash

27 lines
758 B
Bash

#!/bin/bash
FILE_LIST=$1
echo "$FILE_LIST"
# Check if file_list.txt exists
if [ ! -f $FILE_LIST ]; then
echo "input file not found!"
exit 1
fi
INPUT_PATH=/home/richard/Projects/06_research/maximum_planar_subgraph/benchmark_data/graph_datasets/north/graphml/
# Read file paths from file_list.txt
while IFS= read -r INPUT_FILE; do
# Extract filename stem
filename=$(basename -- "$INPUT_FILE")
filename_stem="${filename%.*}"
# Modify output path
OUTPUT_PATH=/home/richard/Projects/06_research/maximum_planar_subgraph/benchmark_data/graph_datasets/north/gml/"$filename_stem".gml
# Call your program with input and modified output paths
./graphml_to_gml "$INPUT_PATH$INPUT_FILE" "$OUTPUT_PATH"
done < $FILE_LIST