Some Issues about shell programming

Source: Internet
Author: User
One problem with shell programming-general Linux technology-Linux programming and kernel information. The following is a detailed description. I = 0
Until [$ I-gt 10]
Do
J =-10
Until [$ j-gt 90]
Do
Cat Data. mag.16.RA. $ I. $ (expr $ I + 1 ). DE. $ j. $ (expr $ j + 1 ). dat | ark '{if ($112 = 1) | ($113> = 8) print}'> Data. mag.16.RA. $ I. $ (expr $ I + 1 ). dec. $ j. $ (expr $ j + 1 ). dat
J = $ (expr $ j + 1)
Done
I = $ (expr $ I + 1)
Done

A self-written script
The purpose is to Filter column x of each file.
If the value of column x in this row is greater than a certain number, it is retained; otherwise, it is excluded.
But if it is a two-digit judgment, it involves the X-1 Column
What I want to achieve is that the row is retained if the X-1 column = 1 or column x is greater than 8
The above script seems to have a problem... I have basically learned how to use it for shell programming. Which of the following is not recommended?
Thank you.

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.