6

5 comments

Are you familiar with functions and aliases? I made this one a function, I don't recall when you are supposed to use a function as opposed to an alias.

I have a file ~/bin/functions which I add this..

5phuks () { for i in {1..5}; do firefox phuks.co/random; done }

In .bashrc I have this...

if [ -f bin/functions ]; then . bin/functions fi

Source bashrc with . .bashrc, then run 5phuks as a command.

[–] KillBill 1 points (+1|-0)

Not at all really, I can usually work out what a script does by reading it, but that's the extent of it.

I don't use functions or aliases a whole lot, nowhere near what some people do, but I do have a few aliases I like a lot. eg.. a handful

alias acs='apt-cache search'
alias acsh='apt-cache show'
alias hisgrep='history | grep -i'
lynxd='lynx -dump'
lynxs='lynx -source'

[–] KillBill 1 points (+1|-0) Edited

Actually I did use some similar aliases back a long time ago. But I rarely use the terminal outside updating and a few other things so the terminal memory and up arrow key are enough for me to avoid much typing.

Keep making these threads though because talking about stuff is always better than articles or videos. I remember you made a good thread on the Voat Linux sub with some good command line programs in it as well.