corvus

joined 1 year ago
[โ€“] corvus@lemmy.ml 1 points 2 days ago* (last edited 2 days ago) (2 children)

Because learning Linux takes time, I've been using Linux and the command line many years and it's the first time I come across that command. I even made an alias for 'history | grep' to search for commands in history ๐Ÿ˜‚

[โ€“] corvus@lemmy.ml 1 points 4 days ago

That's another great option, thanks.

[โ€“] corvus@lemmy.ml 2 points 4 days ago

the answer is !371:p and then up!

[โ€“] corvus@lemmy.ml 2 points 4 days ago

ohh now I got it....yes thats it! Thanks!!

[โ€“] corvus@lemmy.ml 1 points 4 days ago (4 children)

but can you modify the command? I tried but I couldn't.

[โ€“] corvus@lemmy.ml 2 points 4 days ago

basename $0 returns bash in both.

[โ€“] corvus@lemmy.ml 1 points 4 days ago

It doesn't do anything, just prints a blank line.

[โ€“] corvus@lemmy.ml 1 points 4 days ago (3 children)

Yeah, it's bash. But !12345 executes the command 12345, but I don't want to execute it, just print it to the prompt.

[โ€“] corvus@lemmy.ml 2 points 4 days ago (2 children)

I was just told, but for the quick test I did I doesn't seem to let me modified the command before executing it.

[โ€“] corvus@lemmy.ml 2 points 4 days ago (7 children)

I didn't know that, it's not what I was asking but it's a cool command, thanks.

48
submitted 4 days ago* (last edited 4 days ago) by corvus@lemmy.ml to c/linux@lemmy.ml
 

There is a feature in termux (android) history command which when you use !371 to execute the command 371 in the command history it prints that command in the prompt instead of executing it, then you just press enter to execute it. I found it very useful because many times I want to execute a command that is in the history but with some modification, I'm using Konsole in my desktop PC and I couldn't find an option to make such a thing. The only one I found is executing history -p !371, but that just print the command to stdout and not to the prompt itself.

EDIT: the answer is !371:p then up and the command 371 shows up in the prompt. Thanks Schizo!

[โ€“] corvus@lemmy.ml 1 points 1 month ago

Great, thank you!

 

I'm having trouble to find a bluetooth dongle at least 3.0 that needs no propietary firmware. It's easy to find dongles advertised as linux compatible or users that claim that an specific brand works fine in linux, but the problem is that many of them are using propietary firmware without their users being aware because their distributions have already installed propietary drivers or firmwares, or ask users to install them and they just do it. I use debian main repository (without non-free software) in which I failed to make work a couple of linux compatible advertised dongles because debian ask me to install a propietary firmware. So if anyone knows for certain that some brand that needs no such a software in linux I'll apreciate your help.

 
view more: next โ€บ