Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 123033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T04:13:22+00:00 2026-05-11T04:13:22+00:00

In shell script, how do I iterate through each line in an ASCII file

  • 0

In shell script, how do I iterate through each line in an ASCII file and perform an operation on its value

This is the example for an ASCII file which I have

 23      3.4e-09     55.90       5.7e-07 24        12.5      79.90       7.9e-09 25        67.9      78.9       3.4e-09 26        98.8      89.67       9.7e-09 

how cum it will take first line and the iterate…

WAT DO U MEAN BY LINE

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T04:13:22+00:00Added an answer on May 11, 2026 at 4:13 am

    One way (in bash and ksh, at least, may also work in plain sh) is by using something like:

     while read line do   ... done 

    However, this will modify whitespace on each line. If you have a ‘sufficiently fixed’ format on the lines (say each line is ValA ValB ValC), you can modify read line to read vala valb valc

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do I iterate through each line of a text file with Bash ?
I have a python script that will take each file in a directory, iterate
I have a shell script file for monitoring my application, this script will be
I have a shell script which has a for loop that prints the value
I have a shell script like this. line=$@ # get the complete first line
I have a shell script which runs a python program which has its own
I am writing a shell script in which I have to find the last
I am writing a shell script in csh, and one of its functions is
I have a shell script in which I have to execute two queries (on
I put together this shell script to do two things: Change the delimiters in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.