Mailinglist Archive: opensuse (950 mails)

< Previous Next >
Re: [opensuse] alias egrep failure (for zypper)
В Wed, 31 Dec 2014 19:23:35 -0500
Felix Miata <mrmazda@xxxxxxxxxxxxx> пишет:

In order to make it easier than routinely typing

zypper se -s packagestring | grep x86 | egrep -v 'src|devel|xtra'

I tried to make an alias:
alias zse6='zypper se -s $1 | grep x86 | egrep -v "src|devel|xtra" '

but it produces:
# zse6 packagestring
egrep: packagestring: No such file or directory

Aliases do no take an parameters - they are pure textual substitution.
You need to define function to do it.

What needs changing to return x86_64 packages exclusive of src, devel and
xtra that contain the string packagestring? Why is egrep looking for any file
or directory? If I swap each ' for " and vice versa, results are even worse.
I tried escaping pipes and quotes, but it didn't get any better.

Anyone know an easier way than manually typing

zypper se -s packagestring | grep x86 | egrep -v 'src|devel|xtra'

for x86_64 users to exclude 32 bit packages from search results?

Good question. I expected zypper se '*.x86_64' to do it, but it lists
everything. Which is rather unexpected; I wonder how this string is
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
List Navigation