Unix command coloring

1. System.out.println("\u001b[1;31mhahahahhaha\u001b[1;37m");
           hahahahhaha
 
    \u001b[1;31m
    means to start with red.
 
    \u001b[1;37m
    means to start with default color, that is to say, close the coloring.
 
2. alias cvsDirty="cvs status | grep File | grep Modified | sed 's#\(File:.*Status:.*\)#\x1b[1;31m\1\x1b[1;37m#'"
    Create a alias to highlight the modified file.
 
File: L360-CEF-client-test.jpr    Status: Locally Modified
File: L360CEF.properties    Status: Locally Modified
File: L360-CEF-server.jpr    Status: Locally Modified
File: L360-CEF-server-test.jpr    Status: Locally Modified
 
    sed sytax, sed 's#SRC#DEST#" , replace all the matches SRC with DEST.
 
    \x1b[1;31m
    means to start with red.
 
    \x1b[1;37m
    means to start with default color, that is to say, close the coloring.

你可能感兴趣的:(unix,职场,command,休闲,coloring)