- 论坛徽章:
- 0
|
I need run the following steps many times a day, how can I put all the five steps together in one scripts? The question is I must create a file (step 1) every time, then run step 2 to step 5. Of course, I can make a file, then read from a file and so on, but I don't want to do that.
Thanks for your help, I am learning the shell scripts! Pls don't tease me.
1. make a file
$cat >file
abc
cdf xyz
edg
hgy
2. run a perl scripts (convert file format file to file 1) to produce a file named file1
$ scripts.pl > file1
3. Run PERL scripts to query database
$ gene.pl -i file1 -e abc_config_cfg -o output_file
4. unique the output_file
$ cut -f1,2 output_file|sort|uniq >uniq_summary
5. copy the four files (file, file1, output_file, uniq_summary) to corresponding folder
$ cp file file1 output_file uniq_summary /home/your_corresponding_folder |
|