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

  • Home
  • SEARCH
  • 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 4100038
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:30:51+00:00 2026-05-20T20:30:51+00:00

I have a very basic shell script here: for file in Alt_moabit Book_arrival Door_flowers

  • 0

I have a very basic shell script here:

for file in Alt_moabit Book_arrival Door_flowers Leaving_laptop
do
    for qp in 10 12 15 19 22 25 32 39 45 60
    do
        for i in 0 1
        do
            echo "$file\t$qp\t$i" >> psnr.txt
            ./command > $file-$qp-psnr.txt 2>> psnr.txt
        done
    done
done

command calculates some PSNR values and writes a detailed summary to a file for each combination of file, qp and i. That’s fine.

The 2>> outputs one line of information that I really need. But when executed, I get:

Alt_moabit  10  0
total   47,8221 50,6329 50,1031
Alt_moabit  10  1
total   47,8408 49,9973 49,8197
Alt_moabit  12  0
total   47,0665 50,1457 49,6755
Alt_moabit  12  1
total   47,1193 49,4284 49,3476

What I want, however, is this:

Alt_moabit  10  0    total  47,8221 50,6329 50,1031
Alt_moabit  10  1    total  47,8408 49,9973 49,8197
Alt_moabit  12  0    total  47,0665 50,1457 49,6755
Alt_moabit  12  1    total  47,1193 49,4284 49,3476

How can I achieve that?

(Please feel free to change the title if you think there’s a more appropriate one)

  • 1 1 Answer
  • 0 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. Editorial Team
    Editorial Team
    2026-05-20T20:30:52+00:00Added an answer on May 20, 2026 at 8:30 pm

    The (GNU version of) echo utility has a -n option to omit the trailing newline. Use that on your first echo. You’ll probably have to put some space after the first line or before the second for readability.

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

Sidebar

Related Questions

I am implementing a very simple file database. I have 2 basic operations: void
I have a very basic script that sets up datepicker on three of my
I recently upgraded VS 2005 to VS 2008. Unfortunately I have a very basic
I have a fish shell script whose default behavior is to send an email
I have a very basic model: class Link(models.Model): title = models.CharField(max_length=250, null=False) user =
I have a very basic logon system, that authenticates users by the means of
I have a very basic question with the Microsoft CRM 4.0 Report wizard. I
So i have this very basic ipad view controller and i was doing some
I have very very basic java question: For the class below: public class Hello
i have very simple basic form in HTML and i want to validate the

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.