You are not logged in.
Scuse me, this a very n00by question:
When I type "sudo iwlist wlan0 scan," I get a list of different access points in my vicinity. Instead of using a mouse to copy/paste the mac addresses when typing in commands, I would have loved to use keyboard input only. How is that possible?
Offline
Try to use GNU screen and it gets a neat feature of "cut and paste"
Or you can use mouse to select the text and press "shift + insert" to paste, it has the same effect as the middle click.
Offline
You could pipe it to xsel -i, maybe grep for HWaddr first, and it's available for Shift+Insert then.
Offline
The GNU screen would require me to have started X, right?
Procyon: what does "pipe it" mean? | grep HWaddr lists only the HWaddr and strips away the other stuff, right?
Offline
The GNU screen would require me to have started X, right?
Screen doesn't need any X. You can run it in an vt if you want to.
Procyon: what does "pipe it" mean? | grep HWaddr lists only the HWaddr and strips away the other stuff, right?
yes
pipe = |
A pipe passes the output of a program to another one.
Last edited by bluewind (2008-11-03 19:58:44)
Offline
Well xsel needs X, so that won't do.
If you do use it for such a task, then also be careful of newlines. Pipe it to xargs echo -n first. So ifconfig | grep HWaddr | xargs echo -n | xsel -i
Offline
The GNU screen would require me to have started X, right?
Procyon: what does "pipe it" mean? | grep HWaddr lists only the HWaddr and strips away the other stuff, right?
Read Manpage of Screen. Trust me, it will be very rewarding in the long run.
"Ctrl A, [" takes you to "selection mode" and use vi-like keybinding to select the text.
"Ctrl A, ]" will paste the selected text.
Offline
Especially note the ^a, ? binding to bring up the help menu. There's only 2 or 3 core bindings you have to remember to get started with screen.
[git] | [AURpkgs] | [arch-games]
Offline
...also be careful of newlines. Pipe it to xargs echo -n first. So ifconfig | grep HWaddr | xargs echo -n | xsel -i
Or you could use quotes, eg
echo $(ls)
looks REALLY bad, but
echo "$(ls)"
is fine.
-dav7
Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.
Offline