note
Bloodnok
How about <c>echo $variable | perl -nae 'print $a[0]'</c> or possibly <c>perl -e 'print((split /\s+/, "'$variable'")[0])'</c> ?
<p>
<b>Update:</b>
<p>
Very many thanx to [LanX] - modifed 2nd suggestion to correct parenthesis, but ignored nested quotes comment since they are most definitely deliberate - without them, perl would split the string <c>'$variable'</c> whereas with them, the shell expands the shell variable and perl then splits that string.
<p>
<div class="pmsig"><div class="pmsig-264639">
A user level that continues to overstate my experience :-))
</div></div>
1088881
1088881