Skip to content

Commit

Permalink
deleting xml tags ...
Browse files Browse the repository at this point in the history
  • Loading branch information
scuzzilla committed Feb 5, 2021
1 parent cebb176 commit ba3f304
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/nc_schemas_extract/nc_schemas_extract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ gen_capabilities_yangs() {

echo -e "${host}"
local cap_list=$("${nc}" --host "${host}" --port "${port}" -u "${username}" -p "${password}" --hello | \
awk -F "module=" '{print $2}' | awk -F "&amp" '{print $1}' 2> /dev/null)
awk -F "module=" '{print $2}' | awk -F "&amp|</nc" '{print $1}' 2> /dev/null)
# local cap_deviations=$("${nc}" --host "${host}" --port "${port}" -u "${username}" -p "${password}" \
# --timeout 30 --reply-timeout 30 --hello | awk -F "deviations=" '{print $2}' | awk -F "<" '{print $1}' 2> /dev/null)

Expand All @@ -123,7 +123,7 @@ gen_capabilities_yangs() {
do
echo -e "YANG - Extracting ${yang} from ${host} ..."
$("${nc}" --host "${host}" --port "${port}" -u "${username}" -p "${password}" \
--get-schema "${yang}" > "${work_dir}/capabilities_yangs/${host}/${yang}.yang")
--get-schema "${yang}" | awk -v RS='<[^>]+>' -v ORS= '1' > "${work_dir}/capabilities_yangs/${host}/${yang}.yang")
done

# for yang in $cap_deviations
Expand Down

0 comments on commit ba3f304

Please sign in to comment.