Hi,
I have a script below. It get's the data from the output of a script that is running hourly. My problem is every time my script runs, it deletes the previous data and put the current data. Please see output below. What I would like to do is to have the hourly output to be appended on the... (3 Replies)
I am running a command which has a parameter that outputs the results to a file each time it is run.
Here is the command:
--fullresult=true > importlog.xml
Can I add the output to the file rather than creating a new one which overwrites the existing one?
If not can I make the file name... (2 Replies)
I've setup a cron job that greps a file every five minutes and then writes (appends) the grep output/result to another file:
grep "monkey" zoo.log | tail -1 >> cron-zoo-log
Is there any way I can add the date and time (timestamp) to the cron-zoo-log file for each time a new line was added?
... (12 Replies)
Hi All,
Great Forum and Great help. Keep up the good work.
My question is what is the command and it's syntax to append a record to an output file using PERL. Please provide the command syntax.
In regular shell you can use the '>>' to append.
Basically, I am creating a small report... (1 Reply)
Hi All, can you help me with this:
grep XXX dir/*.txt|wc -l > newfile.txt - this put the results in the newfile.txt, but I want to add another column in the newfile.txt, string 'YYYYY', separated somehow, which corresponds on the grep results?
For example grep will grep XXX dir/*.txt|wc -l >... (5 Replies)
I'm trying to output the contents of the infile to the outfile using Append.
I will want to use append but the syntax doesn't seem to be working !
Input file (called a.txt) contains this:
a
a
a
b
b
b
I'm running shell script (called k.sh) from Unix command-line like this:
./k.sh .... (1 Reply)
Noob question!
I know almost nothing so far, and I'm trying to teach myself from books, on a typical command line without using scripts how would I append output from a sort to a file in a completely different directory?
example:
If I'm sorting a file in my documents directory but I... (2 Replies)
Hi All,
I am working on nawk script, has the small function which prints the output on the screen.Am trying to print/append the same output in a file.
Basically nawk script should print the output on the console/screen and as well it should write/append the same result to a file.
script :... (3 Replies)
Hello,
i'm trying to force a command to read every second from an interface
watch -n1 (command) /dev/x | cat >> output
but it continue to overwrite the file, without append the content
Thanks and advace for help as usual
regards (4 Replies)
Hi All,
I have two files
File1
frame,007C1 server1_Parent
frame,007C3 server2_Silver
frame,007EE server3_Bronze
frame,00855 server4_Parent
frame,00856 server4_Parent
frame,00858 server5_Parent
frame,008FA server6_Silver
frame,008FB server6_Silver
frame,008FC server6_Silver... (2 Replies)
Discussion started by: ranjancom2000
2 Replies
LEARN ABOUT OPENDARWIN
close
close(n) Tcl Built-In Commands close(n)
__________________________________________________________________________________________________________________________________________________NAME
close - Close an open channel.
SYNOPSIS
close channelId
_________________________________________________________________DESCRIPTION
Closes the channel given by channelId.
ChannelId must be an identifier for an open channel such as a Tcl standard channel (stdin, stdout, or stderr), the return value from an |
invocation of open or socket, or the result of a channel creation command provided by a Tcl extension.
All buffered output is flushed to the channel's output device, any buffered input is discarded, the underlying file or device is closed,
and channelId becomes unavailable for use.
If the channel is blocking, the command does not return until all output is flushed. If the channel is nonblocking and there is unflushed |
output, the channel remains open and the command returns immediately; output will be flushed in the background and the channel will be |
closed when all the flushing is complete.
If channelId is a blocking channel for a command pipeline then close waits for the child processes to complete.
If the channel is shared between interpreters, then close makes channelId unavailable in the invoking interpreter but has no other effect |
until all of the sharing interpreters have closed the channel. When the last interpreter in which the channel is registered invokes close, |
the cleanup actions described above occur. See the interp command for a description of channel sharing. |
Channels are automatically closed when an interpreter is destroyed and when the process exits. Channels are switched to blocking mode, to |
ensure that all output is correctly flushed before the process exits.
The command returns an empty string, and may generate an error if an error occurs while flushing output.
SEE ALSO
file(n), open(n), socket(n), eof(n), Tcl_StandardChannels(3)KEYWORDS
blocking, channel, close, nonblocking
Tcl 7.5 close(n)