I have an attribute that contains multiple words.
Example:
0x1230ac1="Brown Fox is Near"
I am able to get the contents of the attribute by typing a command (using a CLI interface) like this:
show attr=0x1230ac1
The output of this "show" command looks like this:
ID Name Value
0x1230ac1 User_Attribute1 Brown Fox is Near
If I use this same "show" command in a bash script I can do this:
show attr=0x1230ac1 | sed 1d | awk '{print $1,$3,$4,$5,$6}'
This is problematic because the string in the Value column might have 2 words or 20 words. I don't want to do an awk for each.
Is there a way to awk or sed or other which will pass the entire contents of 'Value' so that in my CLI script it will display all words that are contained within 'Value' ? This is important because I need to pass 'Value' to a string variable within the script.
Example:
MYSTRING=`show attr=0x1230ac1 | sed 1d | awk '{print $3-$99}' `
I know that the print $3-$99 is incorrect. It's just the example I am trying to do without having to put every possible print number.