Created
February 23, 2016 20:21
-
-
Save linneman/de40cb0d75fa2759f912 to your computer and use it in GitHub Desktop.
awk script to further convert nv-item update script output from ORCT to whatever output format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env awk -f | |
# awk script to further convert nv-item update script output from ORCT | |
# to whatever output format. In the given example each invocation of | |
# the nvimg application is quoted in order to further process the | |
# result code. | |
# | |
# invocation: ./convert.sh <update-script-file> | |
BEGIN { RS = ""; FS = "\n" } | |
{ | |
if ($0 ~ /nvimgr/) | |
{ | |
print $1 | |
printf "$(" | |
for(i = 2; i <= NF; ++i ) { | |
str = $i | |
{ gsub(/\\/, "", str); printf str } | |
} | |
print ")\n" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment