This question already has an answer here:

The following terminal command will print the output of any other command in a slow fashion.

<any command> | awk '{system("sleep .2");print}'

I often like to use this and I want to create an alias in ~/.bashrc. However I'm not able to bind it. Any combination of nested apostrophes gives me syntax errors. I'm wondering why this is happening.

Last try was:

alias slowprint="| awk '{system("sleep .2");print}'"

marked as duplicate by Gilles shell Feb 7 '17 at 23:25

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Consider a function instead:

function slowprint { awk '{system("sleep .2");print}'; }

Then you can do:

seq 1 1000 | slowprint

Aliases are not expanded unless they are the first word of the command.

  • Perfect. Did not know about functions. Thanks! – E. l4d3 Feb 7 '17 at 18:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.