Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

sudo !! alias

# You can use the 'history' built-in to do the expansion:
alias please='sudo $(history -p !!)'

# If the command is more than a simple command (e.g. it contains redirections or pipes), you need to invoke a shell under sudo:
alias please='sudo "$BASH" -c "$(history -p !!)"'
Comment

PREVIOUS NEXT
Code Example
Shell :: redis mac 
Shell :: change user terminal 
Shell :: awk if column greater than 
Shell :: YCM core library not detected 
Shell :: linux check if screen is running 
Shell :: install radium 
Shell :: Endpoint Security VPN build 986000724 is already installed on this computer. 
Shell :: ping redis server 
Shell :: batch call another batch with parameters 
Shell :: after checking out a previous commit go back to latest commit 
Shell :: openssh setup firewall on windows 
Shell :: netcat file 
Shell :: file system ntfs not configured in kernel 
Shell :: linux list files in directory 
Shell :: helm rhel 
Shell :: power shell 
Shell :: qbs linux 
Shell :: mocha quiet 
Shell :: require php mailer 
Shell :: enable systemd 
Shell :: merge last three commits squash 
Shell :: kubernetes get node taints 
Shell :: docker compose up 
Shell :: how to checkout to another branch in git 
Shell :: ffmpeg mp4 to webm 
Shell :: git merge master into branch 
Shell :: git remove local branch 
Shell :: nginx dockerfile 
Shell :: docker connect usb device 
Shell :: cargo new lib 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =