1
vote
1answer
105 views

Alias for redirecting both standard output and standard error, as well as sending to background [duplicate]

I am trying to create an alias for redirecting both standard output and standard error of gedit to /dev/null, whilst sending the command to background. This works: $ alias gedit='gedit $1 > ...
5
votes
1answer
125 views

ask for comfirmation when file is replaced using a redirection

I'm a careless terminal driver scared of accidentally deleting files, hence using some aliases like alias rm='rm -i' for rm, mv, cp. How can I get a similar confirmation behavior for file redirections ...
13
votes
1answer
479 views

Grep alias - line numbers unless it's in a pipeline

I want to create a bash alias for grep that adds line numbers: alias grep='grep -n' But that, of course, adds line numbers to pipelines as well. Most of the time (and no exceptions come to mind) I ...