Thursday, July 21, 2011

Diff Tool Mac

I have to say FileMerge is one of the best diff tool I have seen.
Just change the folder and do opendiff for two desired files.
I wanted to see the changes I made on two files by using diff, I was immediately sold!

The tool is already included in the system if you have Xcode environment set up

opendiff Jul20.m Jul21.m

Tuesday, July 19, 2011

Changing the bash prompt mac

My bash prompt looked long and clumsy. So I wanted it short.

FIrst I opened the bash profile


nano .bash_profile
Then I added:
export PS1="My-Mac2:"
Write out, and voila!

Thursday, July 14, 2011

Using simple unix command line in Matlab

I was not aware that I could use the unix commands in the matlab command.
This can be done by having prompt in the command:

>> !rm *.png
>> !rm *.gif
>> !rm *.fig
>> !rm *.mat

Wednesday, July 6, 2011

Close mac Terminal after you are done

The exit command:
It works if the following setting is done:
Terminal
>Preferences
>Settings
>Shell
>Prompt before closing: never
or
> When the shell exits:
select: close if the shell exited cleanly

The following kills the terminal:

killall Terminal

So, if I want to kill the terminal after I am done, I will simply add:
killall Terminal
instead of kill