I need to use a modified grep function to find certain jobs on our cronjob repositories (cvs & git) in a more automated way. So I got these functions already made for that job, but not sure how to enter them into my profile so I can use them like any other Unix command.
The usage should be something like: grepcon <text_to_search>
The function is as follows:
function grepcron {
echo 'in cvs'
cd /somedir/otherdir
grep -irn $1 country1/crontab.* country2/crontab.*
cd -
echo 'in git'
cd /somedir/crontabs/user1/
grep -irn $1
}
Is there any way I can add this to my profile? So every time I log into my user, it loads automatically.