You are not logged in.
Pages: 1
Hey everybody,
I am writing a a little script which automatizes some of my arch-setup..
Hence I want to provide this script to some of my friends it should me mostly automated.
Therefore the script needs capable of installing possible drivers just by getting a hint passed.
So here is the Question:
Is it possible to let packer return the exact package names when using the -Ss option?
Exact name of the package means just the package name without any information.
Example:
I want to install the drivers for a Epson printer and my only Information is "SX525WD. A normal search with packer looks like this:
$ sudo packer -Ss SX525WD
aur/epson-inkjet-printer-workforce-635-nx625-series 1.0.1-6
Epson printer driver (ME Office 82WD, 85ND, 900WD, 960FWD / Stylus NX625, SX525WD, SX620FW,
TX560WD / Stylus Office B42WD, BX525WD, BX625FWD, TX620FWD / WorkForce T42WD, 60, 625, 630,
633, 635)
But I would rather like a result like this:
$ sudo packer -Ss SX525WD
epson-inkjet-printer-workforce-635-nx625-series
Is there a possible solution?
Thank you very much!
Jakunar
Last edited by jakunar (2011-12-08 06:50:49)
Offline
I doubt there's a way to do it with packer itself, but it looks like something that shouldn't be very hard to do with regular expressions
EDIT: I don't know what you're writing the script in, but you could use regular expressions to identify the / in the output and then track until the space and that would give you the package name
Last edited by kyla (2011-12-08 05:11:09)
Offline
[karol@black ~]$ packer -Ssq SX525WD
epson-inkjet-printer-workforce-635-nx625-series
Offline
Smokin' ****
That worked!!! Have only gotten halfway trying to implement some Perl code in my shell script.. but 1. it doesn't work and 2. it looks crappy..
Never used perl before..
Again: THX a lot!!!
Offline
Pages: 1