Skip to ContentSkip to Footer
Start of content
- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - Linux
- >
- General
- >
- redirection question?
General
-
- Forums
-
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Middle East
- HPE Blog, Latin America
- HPE Blog, Russia
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
-
Blogs
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Blog, Latin America
- HPE Blog, Middle East
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
-
Information
- Community
- Welcome
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Tips and Tricks
- Resources
- Announcements
- Email us
- Feedback
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-07-2001 02:34 AM
11-07-2001 02:34 AM
let's say i run a program "a.out"
================
a.out
================
can i store input(from inputfile)
in outputfile ?
for example
$ a.out > outputfile
--------------------
input a number:
332 #user input
input second number:
232 #user input
result is:
332+232=564
--------------------
can i redirect 332 & 232 (user input) to outputfile along with standard output?
thx
Eugene Kim
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-07-2001 03:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-07-2001 04:29 AM
11-07-2001 04:29 AM
Re: redirection question?
A different method you might want to look at is "tee".
Do a "man tee" and see if you like it.
HTH,
Paul
Do a "man tee" and see if you like it.
HTH,
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-07-2001 01:42 PM
11-07-2001 01:42 PM
Re: redirection question?
hi..
i don't think i made my question clear --;
let's say
------------------
$ neg.out
input number:
300
result is -300
------------------
neg.out is waiting for user input
from stdin..
and user inputs "300"
then neg.out gives me
"result is -300"
here's my question
when i redirect output to file
as..
---------------------
$ neg.out >outputfile
input number:
300 #user input
$ cat outputfile
input number:
result is -300
---------------------
can i store the user input "300" in the outputfile too?
so that when i
----------------------
$cat outputfile
input number:
300
result is -300
----------------------
was your answer for this question? --;
if it was, can u give me a little more explanation about how to do it?
thx
Eugene Kim
i don't think i made my question clear --;
let's say
------------------
$ neg.out
input number:
300
result is -300
------------------
neg.out is waiting for user input
from stdin..
and user inputs "300"
then neg.out gives me
"result is -300"
here's my question
when i redirect output to file
as..
---------------------
$ neg.out >outputfile
input number:
300 #user input
$ cat outputfile
input number:
result is -300
---------------------
can i store the user input "300" in the outputfile too?
so that when i
----------------------
$cat outputfile
input number:
300
result is -300
----------------------
was your answer for this question? --;
if it was, can u give me a little more explanation about how to do it?
thx
Eugene Kim
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
End of content
United States
Hewlett Packard Enterprise International
Communities
- Communities
- HPE Blogs and Forum
© Copyright 2021 Hewlett Packard Enterprise Development LP