Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: globbing and set a command
- X-seq: zsh-users 14783
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- To: ugaciaka <ugaciaka@xxxxxxxxx>
- Subject: Re: globbing and set a command
- Date: Wed, 03 Feb 2010 13:31:24 +0100
- Cc: zsh-users@xxxxxxx
- In-reply-to: <e7db6e961002022304x620d361t83a935a47705a4d@xxxxxxxxxxxxxx> (ugaciaka@xxxxxxxxx's message of "Wed, 3 Feb 2010 08:04:52 +0100")
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <e7db6e961002022303m513f6fb8rad7b73c2b74d0462@xxxxxxxxxxxxxx> <e7db6e961002022304x620d361t83a935a47705a4d@xxxxxxxxxxxxxx>
ugaciaka wrote:
[...]
> But I want write a unique command like
>
> cpufreq-set -c (0|1) -g conservative
>
> I was thinking of doing a for loop, but before I wanted to know if
> there was a Âglobbing-way.
"Globbing" is for matching "stuff". Files in particular. That cannot
help you here.
Let's see if I'm with you so far:
You basically want to CPU 0 and 1 to be controlled by the conservative
governor, right? I think `cpufreq-set' let's you specify options like
this: "-c0" instead of this: "-c 0". If you're allowed to specify the -c
option more than once per call of the program, you could do this:
% cpufreq-set -c{0,1} -g conservative
That would execute the following command:
% cpufreq-set -c0 -c1 -g conservative
No character advantage it seems.
If cpufreq-set doesn't allow that, you need to go with a loop. Others
described that in this thread already.
Regards, Frank
--
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
-- RFC 1925
Messages sorted by:
Reverse Date,
Date,
Thread,
Author