I have what seems to be a fairly complex task at hand. I am dealing with 3 outputs from a database.
a) Listing of tables. The first 3 characters are always an identifier of an application. See in part b -
Example-
b) Each table has a field I need to capture-
c) The first three characters of that table name, is always the 3 digit identifier of a specific application..
SO- What I need to do is combine everything into a distinct CSV file, where I have something like this
My problem is that I can't join the tables on a certain field. Can anyone think of a fancy way i may be able to use a where clause, or a like clause, or something..or do some fancy awk work on this?
Hi All,
I've written a shell script in which i defined two varibles
for example:
str=1.0.0.15
timeStamp=2008.03.08
now using this varibles i need to modify a text file.
The text content looks like this
************************
* packageNumber : 1.0.0.14 *
* date :... (2 Replies)
I am in a dire need of doing this job , please help from shell script or perl script. It will be highly appreciated.
Please have a look at the following INPUT file;
The first 14 rows are not of interest but I want them to be included in the output file as they are. From the row 14... (3 Replies)
Here is the sample file:
646 STARTED Tue Dec 30 06:38:53 2008
Job DdCustXAddr_brad has been reset.
647 STARTED Tue Dec 30 06:38:54 2008
Starting Job DdCustXAddr_brad. (...)
704 STARTED Tue Dec 30 06:49:02 2008
Job DdCustXAddr_brad aborted.
I want to combine every non-numbered line... (4 Replies)
hi friends,
The code:
i=1
while
do
filename=`/usr/bin/ls -l| awk '{ print $9}'`
echo $filename>>summary.csv
#Gives the name of the file stored at column 9
count=`wc -l $filename | awk '{print $1}'`
echo $count>>summary.csv
#Gives just the count of lines of file "filename"
i=`expr... (1 Reply)
Hi Forum.
Is there a quick way to do the following search/replace within a block of data? I tried to google the solution but didn't really know what to look for.
I have the following text file (I want to search for a particular string "s_m_f_acct_txn_daily_a1" and replace the... (5 Replies)
I have one space delimited file with multiple columns and one tab delimited file with multiple columns (They have the same number of rows). I want to basically combine these two text files into a new text file by column. How would I go about doing that? (1 Reply)
Hi Experts,
I have a text exactly like below in a file:
id item_id
item_date prin_mkt_val
--------------------------- ---------------------------
------------------------------- ------------------------
... (1 Reply)
Hi,
I have file with the following text,
/analysis2012/533/mc_S10_533/DYJets50/vgtree_1_1_33l.root
/analysis2012/533/mc_S10_533/DYJets50/vgtree_2_5_33l.root
/analysis2012/533/mc_S10_533/DYJets50/vgtree_6_7_33l.root
and many such files. For some operation on these files, I would like... (9 Replies)
Hi I want to create a code that can do this for all text files in a folder.
The filenames are all listed in the following syntax
UNIQUEID-LABID_ - .txt
Each file has a unique ID and a different name and the content in the file looks like this:
Kinship Analysis Report --- Likelihood... (12 Replies)
Hi. I've tried several different programs to try and solve this problem, but none of them seem to have done exactly what I want (and I need the file in a very specific format). I have a large file of DNA sequences in a multifasta file like this, with around 15 000 genes:
... (2 Replies)
Discussion started by: 4galaxy7
2 Replies
LEARN ABOUT OPENDARWIN
puts
puts(n) Tcl Built-In Commands puts(n)
__________________________________________________________________________________________________________________________________________________NAME
puts - Write to a channel
SYNOPSIS
puts ?-nonewline? ?channelId? string
_________________________________________________________________DESCRIPTION
Writes the characters given by string to the channel given by channelId.
ChannelId must be an identifier for an open channel such as a Tcl standard channel (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. The channel must have been opened for output.
If no channelId is specified then it defaults to stdout. Puts normally outputs a newline character after string, but this feature may be
suppressed by specifying the -nonewline switch.
Newline characters in the output are translated by puts to platform-specific end-of-line sequences according to the current value of the
-translation option for the channel (for example, on PCs newlines are normally replaced with carriage-return-linefeed sequences; on Macin-
toshes newlines are normally replaced with carriage-returns). See the fconfigure manual entry for a discussion on ways in which fconfigure
will alter output.
Tcl buffers output internally, so characters written with puts may not appear immediately on the output file or device; Tcl will normally
delay output until the buffer is full or the channel is closed. You can force output to appear immediately with the flush command.
When the output buffer fills up, the puts command will normally block until all the buffered data has been accepted for output by the oper-
ating system. If channelId is in nonblocking mode then the puts command will not block even if the operating system cannot accept the
data. Instead, Tcl continues to buffer the data and writes it in the background as fast as the underlying file or device can accept it.
The application must use the Tcl event loop for nonblocking output to work; otherwise Tcl never finds out that the file or device is ready
for more output data. It is possible for an arbitrarily large amount of data to be buffered for a channel in nonblocking mode, which could
consume a large amount of memory. To avoid wasting memory, nonblocking I/O should normally be used in an event-driven fashion with the
fileevent command (don't invoke puts unless you have recently been notified via a file event that the channel is ready for more output
data).
SEE ALSO
file(n), fileevent(n), Tcl_StandardChannels(3)KEYWORDS
channel, newline, output, write
Tcl 7.5 puts(n)