473,395 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

how to capture console output by using perl?

How do I capture console output by using perl?

We are running some commands in console. My intention is to capture and save that output by using a Perl script.
May 17 '10 #1
2 2394
numberwhun
3,509 Expert Mod 2GB
I am not 100% on what you are asking about, but maybe this will help you.

Regards,

Jeff
May 17 '10 #2
chaarmann
785 Expert 512MB
On Unix, all commands are already captured in the history file.
Or do you want to program a keyboard hook in perl in Windows? That would be a difficult task. But you can easily write a perl program that emulates a shell:

The user starts the perl program and then types his shell commands inside, which are then standard input for perl. The perl program then both executes (system $command, see link from numberwhun) the commands and saves them in a file.
May 19 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Jay Donnell | last post by:
I have a function that is a few thousand lines of code (I didn't write it) and I want to capture the output and save it as a variable. This is very easy to do in php. It would look something like...
2
by: John | last post by:
Hi, In Win App, I used Process class to start a new console appliaction, is it possible to capture the console output and display them in a textbox? Thanks very much! John
8
by: AMeador | last post by:
I can see console output in the output window on VS, but how can you see this text when running the app on a different machine or outside of VS? Thanks! --- Andrew
2
by: John Mott | last post by:
Is there a way for a web form to invoke an .aspx page and get its output using the framework? I suppose i can create a client app and execute the url but I'm thinking there must be a way to do it...
1
by: jonathan184 | last post by:
Hi I am trying to login a JMS admin tool and execute JMS commands and using perl windows to do this. This is the e.g of connection string they said to use when trying to connec to jms ****connect ...
3
by: TC | last post by:
I'm trying to debug a console application, but I can't see the console output. I've seen many references which say that console output is supposed to appear on the Output window when the...
1
by: pssraju | last post by:
Hi, I am not sure whether I am posting it in right location as i cant see any shell scripting forum here. Below script works perfectly fine from command line, but when I run through browser I am...
1
by: chitralaxman | last post by:
sir, i've written a program which will pass input to an exe file using system command and now i'm in need to capture the output produced by the .exe file for that input . the output should be...
27
by: CarlosMB | last post by:
Hello, I am writing code that uses a DLL which is supposed to print to console some useful information but for some reason it is not doing so. The environment is a bit complex to explain but...
3
by: Sidra Nisar | last post by:
Hello……I am working on voice transmission control through linux as my project in high school……I need to know if the comments I have made on the following program are correct…. Object of the perl...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.