benchmark_mps/data_process/file_process_rome.bash

29 lines
783 B
Bash
Raw Normal View History

#!/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/rome/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/rome/gml/"$filename_stem".gml
echo "$filename_stem"
# Call your program with input and modified output paths
./graphml_to_gml "$INPUT_PATH$INPUT_FILE" "$OUTPUT_PATH"
done < $FILE_LIST