Sponsored Content
Top Forums Shell Programming and Scripting Capture output of command triggered in background Post 302840681 by wisecracker on Tuesday 6th of August 2013 09:45:34 AM
Old 08-06-2013
Although a little convoluted you couid save each, (set of?), result(s) to disk and then read the contents of each saved file at your leisure...

Just an alternative thought...
 

10 More Discussions You Might Find Interesting

1. Solaris

how to capture oracle export log while running as background process

I ran the Oracle 9i export command from a terminal to export out a big table using "exp andrew/password file=andrew.dmp log=andrew.log" From the terminal I can see that the export is running as there is some output from the oracle export job. The export job is not complete yet. When i go check... (4 Replies)
Discussion started by: hippo2020
4 Replies

2. Shell Programming and Scripting

[csh] How to capture output from a command and pass it on to a variable?

Hi there! I'm trying to write a script that will capture output from a command and assign it to a variable. Let's say, for example, I'd like to catch from inside the script whatever the following command outputs: ls *.aaa and put it into a variable "listoffiles". What I tried was: set... (3 Replies)
Discussion started by: machinogodzilla
3 Replies

3. Shell Programming and Scripting

How do I capture multiple lines of the status output of a command?

I need to know what the upload speed of an Internet connection. I thought the easiest way to do this would be to transfer a file via FTP to my server using the command: sh-3.2$ ftp -u ftp://username:password@computerdomain/directory/ file_to_be_uploaded Note: My environment allows me to issue... (2 Replies)
Discussion started by: zzz1528
2 Replies

4. Solaris

How to capture only some part of output when command executed??

Hi, When I execute this command prtdiag -v output sample : System clock frequency: 160 MHZ Memory size: 4GB ==================================== CPUs ==================================== E$ CPU CPU CPU Freq Size ... (4 Replies)
Discussion started by: vijaysachin
4 Replies

5. Shell Programming and Scripting

Enter the command to capture output--help

&& echo "PLEASE enter the command to capture output" || echo "Processing your command manual" x=$# echo $x while do while man $@ | read -r line do >$@.txt ... (1 Reply)
Discussion started by: rrd1986
1 Replies

6. Shell Programming and Scripting

Log Capture for Background Process

Hi , I am running a backgorund process called hello.sh ./hello & Now i need to capture the log file as it produces the output . i am not able to use " >> " nor " tee " to capture the output file / log file . Please let me know how can i do it ? Regards, Deepak Konnur (3 Replies)
Discussion started by: dskonnur
3 Replies

7. Solaris

How to capture Output of truus command

Hi I want to check if some process is sleeping. I can see that in truss -p <pid> I want to capture output and check that output if proces sis sleeping. Please suggest way to capture output of truss command or other way to check if process is sleeping (1 Reply)
Discussion started by: ankush_mehra
1 Replies

8. Shell Programming and Scripting

Expect command when triggered by launchd

Hi folks, Im having trouble with an expect command in a shell script I use to back up mac os x servers. This one is being run on a 10.8.2 Server as part of a larger bash script. The script executes perfectly all the way through when triggered on the command line, but when launchd triggers it at... (4 Replies)
Discussion started by: rowie718
4 Replies

9. HP-UX

How capture all user command line output?

Hi I want to know how capture all user command line output and save this commands and outputs to text files? if you have script for this subject please give me.:o please help me thank you (6 Replies)
Discussion started by: amvhd
6 Replies

10. Programming

Python Paramiko multi threading to capture all output for command applied in loop

My issue : I am getting only last command output data in ouput file. Though comamnd "print(output)" displays data for all 3rd column values but the data saved in file is not what required it hs to be the same which is being printed by command"print(output)". Could you please help me to fix this,... (0 Replies)
Discussion started by: as7951
0 Replies
DtEditorSaveContentsToFile(library call)								  DtEditorSaveContentsToFile(library call)

NAME
DtEditorSaveContentsToFile -- save the contents of a DtEditor widget to a file SYNOPSIS
#include <Dt/Editor.h> DtEditorErrorCode DtEditorSaveContentsToFile( Widget widget, char *fileName, Boolean overwriteIfExists, Boolean hardCarriageReturns, Boolean markContentsAsSaved); DESCRIPTION
The DtEditorSaveContentsToFile function saves the entire contents of the DtEditor widget to a file, optionally replacing soft line feeds (word wraps) with <newline>s. If the file does not exist and the directory has the correct write permissions, the file is created. If the file exists and the overwriteIfExists argument is set to True, the contents of the file are overwritten. If the file or its directory does not have the correct write permissions, an error is returned. The DtEditor widget tracks whether its contents have changed since they were last saved or retrieved. If the markContentsAsSaved argument is set to False, a copy of the data is saved without affecting whether DtEditorCheckForUnsavedChanges(3) reports that there are unsaved changes. This is useful if the application needs to save a copy of the contents to a temporary file. The widget argument specifies the DtEditor widget ID. The fileName argument is the pathname of the file relative to the local system. The overwriteIfExists argument, if set to True, causes DtEditorSaveContentsToFile to save the widget contents even though the file speci- fied by the fileName argument exists and has correct write permissions. If this argument is set to False, DtEditorSaveContentsToFile returns DtEDITOR_WRITABLE_FILE. The hardCarriageReturns argument, if set to True, indicates that the widget should replace any soft line feeds (word wraps) with <newline>s when saving the data. When this argument is set to False, any line wrapped because it reaches the right edge of the window, is saved as one complete line. The markContentsAsSaved argument, when set to True, causes the DtEditor widget to mark that all changes made to date have been saved. When this argument is set to False, the DtEditor widget does not change its status regarding unsaved changes. If an error arises during the save, the status does not change, regardless of the value of the markContentsAsSaved argument. For a complete definition of the DtEditor widget and its associated resources, see DtEditor(3). RETURN VALUE
Upon successful completion, the DtEditorSaveContentsToFile function returns DtEDITOR_NO_ERRORS; otherwise, if it cannot save the data to the file, the function returns one of the following values: DtEDITOR_INVALID_FILENAME No file was specified. DtEDITOR_UNWRITABLE_FILE The application does not have write permission for the file or directory. DtEDITOR_CHAR_SPECIAL_FILE The file is a device-special file. DtEDITOR_BLOCK_MODE_FILE The file is a block-mode device. DtEDITOR_NO_FILE_ACCESS The file cannot be accessed. DtEDITOR_SAVE_FAILED The contents could not be saved for an unspecified reason. DtEDITOR_WRITABLE_FILE The named files exist and the overwriteIfExists argument is set to False. EXAMPLES
The following code segment saves the contents of a DtEditor widget to the local file, Foo, substituting <newline>s for soft line feeds. It also indicates that all changes to the contents of the widget have been saved. Widget editor; DtEditorErrorCode status; char *fname = "Foo"; Boolean overwrite = False, hardReturns = True, markContentsAsSaved = True; status = DtEditorSaveContentsToFile(editor, fname, overwrite, hardReturns, markContentsAsSaved); switch(status) { case DtEDITOR_NO_ERRORS: break; case DtEDITOR_WRITABLE_FILE: printf("Save failed. The file already exists. "); break; default: printf("Could not save contents. "); break; } APPLICATION USAGE
The application should use DtEditorGetContents(3) to retrieve the data in a memory buffer, rather than a disk file. SEE ALSO
Dt/Editor.h - DtEditor(5), DtEditor(3), DtEditorAppend(3), DtEditorAppendFromFile(3), DtEditorCheckForUnsavedChanges(3), DtEditorGetCon- tents(3), DtEditorInsert(3), DtEditorInsertFromFile(3), DtEditorReplace(3), DtEditorReplaceFromFile(3), DtEditorSetContentsFromFile(3), DtEditorSetContents(3). DtEditorSaveContentsToFile(library call)
All times are GMT -4. The time now is 04:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy