[opensuse] alias egrep failure (for zypper)
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 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? -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
В Wed, 31 Dec 2014 19:23:35 -0500 Felix Miata <mrmazda@earthlink.net> пишет:
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 interpreted. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
В Wed, 31 Dec 2014 19:23:35 -0500 Felix Miata <mrmazda@earthlink.net> пишет:
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 interpreted. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 12/31/2014 11:43 PM, Andrei Borzenkov wrote:
В Wed, 31 Dec 2014 19:23:35 -0500 Felix Miata <mrmazda@earthlink.net> пишет:
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 interpreted. consider doing this in a file called .alias:
zse6 () { zypper se -s $1 | grep x86 | egrep -v "src|devel|xtra" } -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Bruce Ferrell composed on 2014-12-31 23:50 (UTC-0800):
Andrei Borzenkov wrote:
Wed, 31 Dec 2014 19:23:35 -0500 Felix Miata ocmposed:
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.
Not the first time I couldn't figure out why an alias didn't work like a script. :-(
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?
consider doing this in a file called .alias:
zse6 () {
zypper se -s $1 | grep x86 | egrep -v "src|devel|xtra"
}
Other than not consuming 4k of storage space for a handful of bytes, how is that better than adding another one line script to /user/local/bin/? This is not for one installation or user, but many. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Felix Miata composed on 2014-12-31 19:23 (UTC-0500):
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?
DejaVu: https://features.opensuse.org/316759 -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Andrei Borzenkov
-
Bruce Ferrell
-
Felix Miata