Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
You are on the right track. first, try simple commands in a terminal window, eg
ls -l > dirdump
cat dirdump (You should see your listing)
If your command doesn't write the file, then there is something different about it. i.e. --normally--if a command puts output on the screen, then > filename puts that same output in a file.
Lot's of good tutorials out there----type "redirection in linux" in a Google search, and you'll find lots---I've got a good one from linuxsa.org.au
I think you are correct . There is something different about screen. I dont know whether to laugh or cry. since screen should be the most standard of standard outputs lol,sniffle.
Oh yesssss---I just glanced at the man page. You need to do some serious reading.
Short answer: If you are sitting in a terminal window, and do the screen command, then it seems that you terminal may cease to be stdout. If so, then i have no clue what the redirection operator does.
I guess I wil have to read then. I'm using Securecrt to shell screen but ultimately will automate the shell of screen to query status and send commands to processes. This is fairly easy on windows so I know its gotta be easy on Linux once I figure out how. Thanks for the tips.
ps. Im not trying to get stdout "of" the terminal (on my client).
Well you were right. It looks like Im going to settle for a dynamic logfile path and enable logging and wrap screen with a few functions
screen.start - calls to screens module to start a console app return screen pointer or id
screen.logFile(v) - if started and v undefined readLogFile
if started and v !undefined appendLogFile || writeLogFile - sounds bad but either append or write undecided yet.
if !started and v return setLogFilePath(v)
unless v == false then no log file
if !started and !v return getLogFilePath()
screen.passCommand(comandName,ParamString)
screen.stop
ps Im thinking of adding startIn which would be a directory in which to start the process
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.