You are not logged in.

#1 2012-07-15 09:39:25

NotFromBrooklyn
Member
Registered: 2011-07-24
Posts: 37
Website

[solved] Need ! function of bashrc

Hi. Can anyone search ! function in your ~/.bashrc or bash.bashrc ?

I'm using CentOS now and remembered of ! command that was realy usefull. It does the last command executed, but preceded with a sudo. I think it may be a bashrc function and as did not remember seeing it in the .bashrc, I think it may be in /etc/bash.bashrc. Can anyone look and paste that function? It would be a huge help, because I tried searching in google and in here, but I've got too many pages/posts with my searches.

Thanks in advance.

Last edited by NotFromBrooklyn (2012-07-15 10:00:41)

Offline

#2 2012-07-15 09:56:59

Bellum
Member
Registered: 2011-08-24
Posts: 230

Re: [solved] Need ! function of bashrc

Huh?

!!

Will be replaced by your last command. So you can type

sudo !!

Is that what you're talking about?

Offline

#3 2012-07-15 10:00:25

NotFromBrooklyn
Member
Registered: 2011-07-24
Posts: 37
Website

Re: [solved] Need ! function of bashrc

Yes, thank you. It was my bad, because I didn't remembered the full command.

Offline

#4 2012-07-16 23:42:41

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,152

Re: [solved] Need ! function of bashrc

man bash

CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB