[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

another sed regex question



i have a list of rpms that came back from a diff of the most recent
updates compared to the rpms that i currently have installed.

i would next like to cut the version number so that i can query what
version, if any of the package is installed.

so, i have

...
bind-9.1.0-4
bind-devel-9.1.0-4
...

in a flat file.

i came up with sed 's/\(.*\)\-[0-9].*/\1/'

this works for

echo bind-devl-9.1.0-4 | sed 's/\(.*\)\-[0-9].*/\1/'

but not for

sed 's/\(.*\)\-[0-9].*/\1/' /rpm.list

i had thought that sec would take a file as an argument. do i just have
some syntax incorrect?




-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.