Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script output to input 1

Status
Not open for further replies.

jo90

Programmer
Jun 19, 2002
30
0
0
GB
Hi,

If I have a script which outputs values onto the console window; how do I read these back in using the same script. sort of like the command line input but it's a lot of different values, I'm using ksh & awk...

Thanks.
 
for i in ksh tee read awk
do
man ${i}
done;

#----------------------------------
change your script's output statements [echo/print ?] to 'tee' them to a temp file. Write a 'while read ....' look to read the values from the temp file.

vlad
+---------------------------+
|#include<disclaimer.h> |
+---------------------------+
 
Vlad,

I seem to note a growing trend in your posts. It seems that you want these Unix-newbies to read the man pages about commands that can help them. Are you getting frustrated with questions that could best be explained if Unix users just used the tools already at their disposal?

I've had users come to me with a question and preface their remarks with &quot;Now don't give me the man page answer ... .&quot; Sometimes Unix can be a tad cryptic, we need to present a more human face to it.

Either that or tell people man -k your question [smarty] Einstein47
(&quot;If computers ever get too powerful, we can organize them into a committee - that will do them in.&quot; - Unknown)
 
Albert :)

While I agree that I might have been overdoing the 'man' explanation recently - my apologies for that, but....
This medium is not the same as the 'face to face' conversation. I can only guess in most case WHAT the actual question is - as is the case with this particular thread. If the OP posting a vague question is expecting a detailed and complete solution.... Well... you know - maybe we should change the name of this site from 'tek-tips' to something else. ;)

I tend to believe in the 'teach them how to fish' approach - maybe I've been overdoing it lately. And for that I apologize once again. I should probably find a better 'middle-ground'.

I've been helping people quite a bit here - after all that's how I been helped and I just hope that the 'helped' will pay in-kind when the time comes.

vlad
+---------------------------+
|#include<disclaimer.h> |
+---------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top