I have a script which uses ssh to access a number of remote systems. There are a number of ways in which these systems can be chosen and I build up a list. Typically, at the end of the input stage the list might look like
As you can see there are duplicate entries and they're not in order.
I tried
but sort sees this as one line with multiple fields and, as such, does nothing.
Is there a way to persuade sort to do what I want, or should I be trying something else.
On the internet no one knows you're a dog
Columb Healy
Code:
echo $_boxes
40 42 44 46 48 50 52 54 40 42 44 46 48 50 52 54 100 102 104 108 110 112
I tried
Code:
_boxes=$(echo _boxes | sort -un)
Is there a way to persuade sort to do what I want, or should I be trying something else.
On the internet no one knows you're a dog
Columb Healy