unix_shell
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| unix_shell [2022/02/18 17:17] – 38.20.199.40 | unix_shell [2022/06/23 10:21] (current) – 134.190.232.106 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | upcoming | + | The commonly used scripts collected from previous Github page and course materials. |
| - | Here's a list of commands to retrieve deleted text in vi: | + | 1.How to set up timer for specific script run? |
| + | |||
| + | < | ||
| + | # | ||
| + | # Twosday.sh | ||
| + | |||
| + | while true; | ||
| + | do | ||
| + | DATE=`date | cut -d' ' -f4` | ||
| + | #echo $DATE | ||
| + | if [[ $DATE == " | ||
| + | then | ||
| + | echo "this is a test program" | ||
| + | qrsh | ||
| + | sleep 1s | ||
| + | fi | ||
| + | done | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | # | ||
| + | # | ||
| + | while true; do echo -ne " | ||
| + | # | ||
| + | while true; do echo -ne "`date +%H: | ||
| + | </ | ||
| + | |||
| + | |||
| + | 2.Here's a list of commands to retrieve deleted text in vi: | ||
| < | < | ||
| Line 76: | Line 104: | ||
| < | < | ||
| - | > | + | https://github.com/brentp/pyfasta |
| - | / | + | # To install python2 version |
| + | pip install pyfasta | ||
| + | # To install python3 version | ||
| + | pip3 install pyfasta | ||
| + | |||
| + | #split a fasta file into 6 new files of relatively even size: | ||
| + | pyfasta split -n 6 original.fasta | ||
| </ | </ | ||
| Rename file name with the one user wanted https:// | Rename file name with the one user wanted https:// | ||
| + | https:// | ||
| < | < | ||
| + | for i in *; do -- mv " | ||
| + | for f in *; do mv " | ||
| for i in chr* | for i in chr* | ||
| Line 104: | Line 141: | ||
| </ | </ | ||
| - | <Last updated by Xi Zhang on Oct 6th, | + | |
| + | How to use sort in linux, especially ignore the header to sort special col? | ||
| + | < | ||
| + | (head -n 1 all.txt && tail -n +2 all.txt| sort -n -r -k2) > 123.txt | ||
| + | |||
| + | # sort -n | ||
| + | #sort -r | ||
| + | #sort -k | ||
| + | https:// | ||
| + | </ | ||
| + | |||
| + | <Last updated by Xi Zhang on Oct 6th,2021> <June 23th,2022> | ||
unix_shell.1645219075.txt.gz · Last modified: by 38.20.199.40
