hi ,
i want to make alias for rm to be like that :
alias rm 'rm -iv $A | mailx -s "file $A deleted" sherif@hotmail.com'
where A is the input file i will run the rm command on it as example
rm sherif so when that go to the alias it should run like that :
rm -iv $A (where A will bethe input file sherif) | mailx -s "file $A (where A will bethe input file sherif) deleted" sherif@hotmail.com
in another word i want to make that input file name sherif to be variable for the alias of the rm command .
hope you can get what i mean , please feed me back how i can make it i need it for emergency thing thanks
i want to make alias for rm to be like that :
alias rm 'rm -iv $A | mailx -s "file $A deleted" sherif@hotmail.com'
where A is the input file i will run the rm command on it as example
rm sherif so when that go to the alias it should run like that :
rm -iv $A (where A will bethe input file sherif) | mailx -s "file $A (where A will bethe input file sherif) deleted" sherif@hotmail.com
in another word i want to make that input file name sherif to be variable for the alias of the rm command .
hope you can get what i mean , please feed me back how i can make it i need it for emergency thing thanks