Wednesday, February 10, 2010

Grep / less with colors

How to use grep to find patterns and scroll the screen with colors
grep --color=always -nR "something" * | less -R

Execute a program in another terminal

Example running vi in terminal from another one.
vi exemplo.txt > /dev/pts/N (N = {1,2,3..})
to discover which value of N to use, use the command tty  in the terminal where you want to execute the command

No comments:

Blog Archive