11-11-2010
Appending date value mmdd to first column in file
Hi ,
I have a file with a running sequence number. I need to append a date value mmdd format on to the first column.
for e.g.: The file contains records as
001 abc
002 cde
003 edf
004 fgh
005 hik
The output should be
1111001 abc
1111002 cde
1111003 edf
1111004 fgh
1111005 hik
where 1111 is mmdd format of today's date.
Please suggest.
Thanks in advance.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi experts . . .
Sunsolaris 9 version
I have the script as below:
Am getting log file as : archive_today_.log
Please suggest.
##################################################
set 'date'
dd=$3
mon=$2
export mon
yyyy=$6
export yyyy
cd /oracle/P47/saparch (4 Replies)
Discussion started by: vrjalli
4 Replies
2. Shell Programming and Scripting
It appears that this has been asked and answered in similar fashions previously, but I am still unsure how to approach this.
I have two files containing user information:
fileA
ttim:/home/ttim:Tiny Tim:632
ppinto:/home/ppinto:Pam Pinto:633
fileB
ttim:xkfgjkd*&#^jhdfh... (3 Replies)
Discussion started by: suzannef
3 Replies
3. Shell Programming and Scripting
Hi , I have the below file with 6 columns.I want to append 'File1' as the 1 column to the file. i have the sample code .It is not working . can u please correct this or make new one .....
awk 'print {'File1',$1,$2,$3,$4,$5,$6}' Source_File> Result_File
Source_File:... (6 Replies)
Discussion started by: satyam_sat
6 Replies
4. Shell Programming and Scripting
Hi all,
I have two files with the same number of lines
the first file is a.dat and looks like
0.000 1.000
1.000 2.000
...
the fields are tab separated
the second file is b.dat and looks like
1.2347 0.546
2.3564 0.321
...
the fields are tab separated
I would like to have a file c.dat... (4 Replies)
Discussion started by: f_o_555
4 Replies
5. Shell Programming and Scripting
I have file called xx
Now i want to rename this file as xxYYYYMMDD_HHMIAM.xls
Here is my code..
export DATE1=`date +%Y%m%d`
mv xx xx$DATE1
This code renames as xxYYYYMMDD
Now how can i append HHMIAM at the end of the file?
Any help is appreciated... (3 Replies)
Discussion started by: govindts
3 Replies
6. UNIX for Dummies Questions & Answers
Hi
I have the data file in the one directory and i have to copy the file in the another directory with the timestamp.
EX:
/ab/cd/a.dat i need to copy this file to the another directory /ef/gh/.
while am copying i need to append the current timestamp in the file like... (3 Replies)
Discussion started by: bobprabhu
3 Replies
7. Shell Programming and Scripting
Hi,
I want to merging all MMDD* files into one file say today_file_dumb.csv and today_file_test.csv
Files format is below.
Thanks
file looks like
AAK_201104191802340972_dumb.csv
AAK_201104191802355572_dumb.csv
LLK_201104191702354722_dumb.csv
KKR_201104191802340972_test.csv... (7 Replies)
Discussion started by: jatt2929
7 Replies
8. UNIX for Dummies Questions & Answers
Hi,
My requirement is to append a date in format DDMMYYYYHHMISS at the end of first line of file which is HEADER. I am trying command
sed -i '1s/.*/&<date_format>/' <file_name>
Where <date_format>=`date +%m%d%Y%H%M%S`
I am somehow misisng the right quotes ti get this added in above... (2 Replies)
Discussion started by: sanjaydubey2006
2 Replies
9. Shell Programming and Scripting
Hi,
I have a requirement to append = in particular row in csv file. Data in csv is as follow:
row1,a,a,a
row2,b,b,b
row3,c,c,c
row4,d,d,d
csv should be modified at row3 and no. of columns are not fixed but rows are. output should be as:
row1,a,a,a
row2,b,b,b
row3,=c,=c,=c... (2 Replies)
Discussion started by: Divya1987
2 Replies
10. Programming
Is there a way to append an existing xlsx worksheet to add data from a text file ?
I have an excel file for which I need to manipulate the first worksheet based on a text file.
I match the text file to the xlsx and write the 'Scores' column in the xlsx sheet and save the workbook.
For those ... (43 Replies)
Discussion started by: nans
43 Replies
LEARN ABOUT DEBIAN
tau_merge
TAU_MERGE(1) Tools TAU_MERGE(1)
NAME
tau_merge - combine multiple node and or thread TAU tracefiles into a merged tracefile
SYNOPSIS
tau_merge [-a] [-r] [-n] [-e eventfile_list] [-m output_eventfile] {tracefile_list} [{output_tracefile} { - }]
DESCRIPTION
tau_merge is generated when TAU is configured with the -TRACE option.
This tool assembles a set of tau trace and event files from multiple multiple nodes or threads across a program's execution into a single
unified trace file. Many TAU trace file tools operate on merged trace files.
Minimally, tau_merge must be invoked with a list of unmerged trace files followed by the desired name of the merged trace file or the -
flag to send the output to the standard out. Typically the list can be designated by giving the shared name of the trace files to be merged
followed by desired range of thread or node designators in brackets or the wild card character '*' to encompass variable thread and node
designations in the filename (trace.A.B.C.trc where A, B and C are the node, context and thread numbers respectively). For example
tautrace.*.trc would represent all tracefiles in a given directory while tautrace.[0-5].0.0.trc would represent the tracefiles of nodes 0
through 5 with context 0 and thread 0.
tau_merge will generate the specified merged trace file and an event definition file, tau.edf by default.
The event definition file can be given an alternative name by using the '-m' flag followed by the desired filename. A list of event
definition files to be merged can be designated explicitly by using the '-e' flag followed by a list of unmerged .edf files, specified in
the same manner as the trace file list.
If computational resources are insufficient to merge all trace and event files simultaneously the process may be undertaken hierarchically.
Corresponding subsets of the tracefiles and eventfiles may be merged in sequence to produce a smaller set of files that can then be to
merged into a singular fully merged tracefile and eventfile. E.g. for a 100 node trace, trace sets 1-10, 11-20, ..., 91-100 could be merged
into traces 1a, 2a, ..., 10a. Then 1a-10a could be merged to create a fully merged tracefile.
OPTIONS
-e eventfile_list explicitly define the eventfiles to be merged
-m output_eventfile explicitly name the merged eventfile to be created
- send the merged tracefile to the standard out
-a adjust earliest timestamp time to zero
-r do not reassemble long events
-n do not block waiting for new events. By default tau_merge will block and wait for new events to be appended if a tracefile is
incomplete. This command allows offline merging of (potentially) incomplete tracefiles.
EXAMPLES
To merge all TAU tracefiles into app.trc and produce a merged tau.edf eventfile:
tau_merge *.trc app.trc
To merge all eventfiles 0-255 into ev0_255merged.edf and TAU tracefiles for nodes 0-255 into the standard out:
tau_merge -e events.[0-255].edf -m ev0_255merged.edf
tautrace.[0-255].*.trc -
To merge eventfiles 0, 5 and seven info ev057.edf and tau tracefiles for nodes 0, 5 and 7 with context and thread 0 into app.trc:
tau_merge -e events.0.edf events.5.edf events.7.edf -m ev057.edf
tautrace.0.0.0.trc tautrace.5.0.0.trc tautrace.7.0.0.trc app.trc
SEE ALSO
tau_convert
tau2profile
tau2vtf
tau2elg
tau2slog2
12/22/2005 TAU_MERGE(1)