The following is the script I use in Macbook (Mountain Lion). It should work on most /*nix shell like bash, csh, ksh etc.
However, I have tested it only in bash.
1 2 3 4 | |
Save this file as “chext”, make it executable chmod +x chext and add to your $PATH.
Now you can use it like this:
1 2 | |
1
| |