diff options
author | LaMont, William(wl2432) <wl2432@att.com> | 2020-02-28 16:48:41 -0500 |
---|---|---|
committer | LaMont, William(wl2432) <wl2432@att.com> | 2020-03-03 18:10:37 -0500 |
commit | 9b65b7126bc77c18c196ed2b6e625a5a864c98dc (patch) | |
tree | 7e0dd55538ad2af20c414369f628134e9f3191ae /src/main/scripts/add_vertex_label.sh | |
parent | 30282f9e3f6ab0ed9599f5bb2e2c743cbd099089 (diff) |
support for v17 through v19
Issue-ID: AAI-2751
Change-Id: I75c9b2057065e1374f25e2b6b12de0a8003ac781
Signed-off-by: LaMont, William(wl2432) <wl2432@att.com>
Diffstat (limited to 'src/main/scripts/add_vertex_label.sh')
-rw-r--r-- | src/main/scripts/add_vertex_label.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/scripts/add_vertex_label.sh b/src/main/scripts/add_vertex_label.sh new file mode 100644 index 0000000..f026bd0 --- /dev/null +++ b/src/main/scripts/add_vertex_label.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +filename=$1; + +if [ -z "${filename}" ]; then + echo "Please provide a graphson file"; + exit 1; +fi; + +if [ ! -f "${filename}" ]; then + echo "Unable to find the graphson file ${filename}"; + exit 1; +fi; + +sed 's/"label":"vertex"\(.*\)"aai-node-type":\[{"id":"\([^"]*\)","value":"\([^"]*\)"/"label":"\3"\1"aai-node-type":[{"id":"\2","value":"\3"/g' ${filename} > "with_label_${filename}";
\ No newline at end of file |