Monday, August 13, 2012

13. Adding your own command in terminal:

For adding your own command which is doing an specific job for you, in the terminal of your  Macbook, write

1. vim ~/.profile

2. alias your_command_name = "add you optional command you needed"

for example I did like this:

alias line = "tail -n 100 Myfile.dat > out.dat"
this means that, if I write the new command, line, in the terminal, I can find the last 100 lines of  the Myfile.dat in the out.dat

3. source ~/.profile 


No comments:

Post a Comment