Skip to content

Commit

Permalink
Merge pull request #632 from arago/fix_generator
Browse files Browse the repository at this point in the history
Fix single file generation
  • Loading branch information
cy303 authored Jun 28, 2024
2 parents a0ace20 + 3400b03 commit dc8a135
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions singleTTL.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/bin/sh
#!/bin/bash

TTLFILE=graphit-ontology.ttl
rm -f $TTLFILE


find . -type f -name '*.ttl' -exec cat {} \; -exec echo $'\n' \;> TMP_cat_all.txt
find . -type f -name '*.ttl' -exec cat {} \; -exec echo "" \;> TMP_cat_all.txt
grep "@prefix" TMP_cat_all.txt | awk '{$1=$1}!A[toupper($0)]++' > TMP_prefixed.txt
grep -v "@prefix" TMP_cat_all.txt > TMP_no_prefixes.txt
cat TMP_prefixed.txt TMP_no_prefixes.txt > $TTLFILE
Expand Down

0 comments on commit dc8a135

Please sign in to comment.