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 8688563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:24:01+00:00 2026-06-12T23:24:01+00:00

I began a project. In the instruction, it is written that we could test

  • 0

I began a project. In the instruction, it is written that we could test our program with this command line :

cat test.txt > test.py

But I have no output.
As I understood, it is supposed to give me an output.

test.txt file looks like :

1
3
4
2
5
6
7
1
1
8
9
3
4
5
1
-1

And the test.py file looks like :

for i in range(16):
    var=raw_input("type something : ")
    print var

I was excepting this command line to redirect the content of the test.txt file to the test.py file while it was running.

I have already read the documentation about the cat command.

Could you help me please ?

In other words, how the cat command is supposed to simulate the user ? I think I have to change something in my python file.

Thank in advance,
Mff

  • 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-06-12T23:24:02+00:00Added an answer on June 12, 2026 at 11:24 pm

    The problem here is that you want cat test.txt | test.py rather than >. | sends the output of one command (cat test.txt) to the input of the other (test.py) whereas > sends the output to a file (which probably means you’ve overwritten test.py with the contents of test.txt).

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

Sidebar

Related Questions

I recently began working on a large project that contains a huge number of
Hey I just began working on a new project that requires, tab navigation, and
My boss has a C++ project that just began hanging today when he hits
Recently, our big project began crashing on unhandled division by zero. No recent code
I just began employing the figure and figcaption tag into a project, but have
I have created a python project which I began development in TextPad and Command
I recently began working on a large ASP.NET WebForms project. The project was using
I just began using Visual Studio to work on a practice .NET project. I
I am working on a project that already has begun being developed. ON some
I began reading the book Code Complete 2nd edition, but stopped reading when I

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.