Numerical Calculation Problems

Source: Internet
Author: User
Numerical computing-general Linux technology-Linux technology and application information. For more information, see the following section. Hello everyone, I am executing the following script, so there is a computing problem. Please take a look:
#! /Bin/bash
Dat_dir =./glmis_exp_data
Ctl_dir =./control_file
Log_dir =./log_file
Sed's/| // G' $ dat_dir/glmis_tables_counts.dat | tr A-Z a-z> $ dat_dir/glmis_tables_counts_compare.dat
While read table_line
Do
Table_name = 'echo $ table_line | awk '{print $1}' | tr A-Z a-Z'
Awk '/infile/{print $2}' $ ctl_dir/$ table_name.ctl | sed "s /'. \/glmis_exp_data \ // g "| sed" s /. dat '// g "> ctl_tmp
Glmis_rows = 0
Table_rows = 0
While read table_row
Do
Table_rows = 'awk'/'$ table_row'/{print $2} '$ dat_dir/glmis_tables_counts_compare.dat'
Echo $ glmis_rows
Echo $ table_rows
Glmis_rows = 'expr $ glmis_rows + $ table_rows'
Echo $ glmis_rows
Done Load_row = 'awk'/Rows successfully loaded/{print $1} '$ log_dir/$ table_line.log'
If ["$ glmis_rows"-eq "$ load_row"]; then
Echo "$ table_line: glmis_rows = load_row = $ glmis_rows"
Else
Echo "$ table_line: error"
Fi

Done
The execution result is:
.
.
.
0
52517.0
Expr: non-numeric argument

S_ywrz_rh: error
0
23673.0
Expr: non-numeric argument

S_ywrz_zt: error

The main problem is the red font.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.