DEV Community

Discussion on: What are your UNIX pipeline commands that saved you from lot of coding/time?

Collapse
 
lucianoq profile image
Luciano Quercia • Edited
alias ctrlc='xclip -selection clipboard -i'
alias ctrlv='xclip -selection clipboard -o'

Examples:

# copy something without opening editors or showing it in terminal
cat ~/.ssh/mykey.pub | ctrlc

# paste clipboard somewhere
ctrlv >> ~/.ssh/known_hosts


ctrlv | tr '[:upper:]' '[:lower:]'
ctrlv | tr -d "\n"
ctrlv | base64 -d 
ctrlv | base64
ctrlv | md5sum

cat myfile | base64 | ctrlc
cat myfile | md5sum | ctrlc



ctrlv | base64 | ctrlc
ctrlv | base64 -d | ctrlc