8 Feb
2003
8 Feb
'03
3:01 a.m.
On 03.02.07 Arpi pressed the following keys:
[Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html] Hi,
echo 1.1 | sed -e 's/^\([0-9]+\)\.\([0-9]+\).*/\1\2/' 1.1
argh
Perhaps using 'tr -d .' instead of sed would work better?
no since it may be '1.2 beta'
maybe |tr -d .|cut -d ' ' -f 1 ?
btw why is the above sed expr. wrong? i don't know sed enough but at first look it seems to be correct.
Because in sed you have to escape + modifier so the expr looks like this: echo 1.1 | sed -e 's/^\([0-9]\+\)\.\([0-9]\+\).*/\1\2/' -- Bastard Operator From 149.156.96.35