The third party is ours.
1. Path
The environment variable $ path does not wrap the line, and it looks very difficult. Path outputs the $ PATH Branch
Echo-e $ {path //:/'/N '}
2. classpath
Similar to path
Echo-e $ {classpath //:/'/N '}
3. rmall
Recursively delete all files and subdirectories in a directory that meet the conditions
For file in $ (find "$ {1:-not. exist}"-name "$ {2:-not. exist}"); do
Rm-RF $ File
Done
4. pkill
Kill processes by name. in Linux, pkill is provided. When Aix or the like is not provided, the following scripts depend on the PS output format. different platforms need to be fine-tuned.
AIX: for PID in $ (PS Xu | grep "$ {1:-Arg. not. exist} "| cut-F3-D'' | tr ''"/N "); do
Kill-9 $ PID
Done
Red-hat: For proc in $ (PS | grep "$ {1:-notexit}" | cut-F1-d'); do
Kill-9 $ proc
Done
5. linkto
Create Symbolic Links in batches. Sometimes you need to copy one or two of multiple subdirectories of a directory, and create symbolic links for all other subdirectories.
SRC =$ {1:-not. exist}
For file in $ (ls $ SRC); do
Ln-S $ src/$ File
Done
6. findinfiles
Search for a file containing a specific string. Maybe find itself or grep itself can do it. There are too many parameters and it will not be used.
For file in $ (find $1-name "$2"); do
If grep-n "$3" $ file; then
Echo 'found in' $ File
Fi
Done
Download sky shell utility: http://cosoft.org.cn/project/showfiles.php? Group_id = 5717