04-19-2008
appending variable number of files
In a particular path of a server I have number of files.The files are generated every date with a date_mth stap on this.There are different files for different clients.
For example in /data1 path i have
X_0416_Score
Y_0416_Score
Z_0417_Score
X_0417_Score
A_0417_Score
If i will run the script for 16-apr-08 it will append all the files for that date and produce a single file named multi_client_score.dat
There may be varibale number of files for different date.I just want to append all the files with the date_mth stmap which is same as today's date month stamp.
please suggest me a script how to do this.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I was wondering if there was a way to append something to filenames based on a wildcard. For example, if I have the following files in a directory:
blah1
blah2
blah3
blah4
blah5
I want to rename these all to:
blah1.txt
blah2.txt
blah3.txt
blah4.txt
blah5.txt
Is there a... (4 Replies)
Discussion started by: Djaunl
4 Replies
2. Shell Programming and Scripting
Hello, I need help in appending the line number of each line to the file and also to get the total number of lines. Can somebody please help me.
I have a file say:
abc
def
ccc
ddd
ffff
The output should be:
Instance1=abc
Instance2=def
Instance3=ccc
Instance4=ddd
Instance5=ffff
... (2 Replies)
Discussion started by: chiru_h
2 Replies
3. Shell Programming and Scripting
hi all,
i'm trying to pass a count of files to a variable thru these set of codes:
sh_count=$(ls -1 fnd_upload_LV*.* |wc -l)
problem is if no files matches that, it will give an error "ls: fnd_upload_LV*.*: No such file or directory".
how do i avoid having the shell script show that... (2 Replies)
Discussion started by: adshocker
2 Replies
4. Shell Programming and Scripting
Hi all,
I'm an extremely newbie with unix/perl. I have a perl script that I need to run on a variable number of input files (i.e., I have to run the perl script on each file, but from run to run, I have a different list of files that need to be put through this script).
I think this can... (2 Replies)
Discussion started by: sunmatrix
2 Replies
5. Shell Programming and Scripting
I have a Query!
by using command
cat >> file1 we can append data's to a already existing file, Similarly is it possible to append a data to a variable.
Thanks in Advance!! (2 Replies)
Discussion started by: gwgreen1
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have to append 2 files and while appending i need to add a running sequence number (counter ) for each line at the first column.
For e.g. If file x contains details as below.
Tom
Dick
Harry
Charlie
and file y contains
Boston
Newyork
LA
Toledo
Then the new file should... (1 Reply)
Discussion started by: kalyansid
1 Replies
7. Shell Programming and Scripting
Hi all,
I have text file having a number P100. what i need is when i run a script, it should add 1 to the above number and append it to the next line of a same text file.. when i use the script next time it should check the last line and add 1 to the last number and so on..
like the text... (5 Replies)
Discussion started by: smarty86
5 Replies
8. Shell Programming and Scripting
Hi there
I have a .ksh script that I am using on an AIX ( Actual Level 5.3.10.0, Maintenance Level 5.3.0.0) where I am logging into a windows box, doing a file count on that server and returning the output to the UNIX session.
I would like to exit the script at this point in time if the... (10 Replies)
Discussion started by: jimbojames
10 Replies
9. Shell Programming and Scripting
Hi everyone,
I have a data file in which the data is stored in event blocks. What I would like to get is that the same file with every data row starting with the number of event block. So here is two event blocks from my file:
<event>
-2 -1 0 0 0 501 0.00000000000E+00
... (2 Replies)
Discussion started by: hayreter
2 Replies
10. Shell Programming and Scripting
hi team,
i need a script for renaming a file with sequence number. script get a file from one directory'/home/billing/Cmm/sms/sms_tmp' append sequence no at the end of file name and move a file to other directory/home/billing/Cmm/sms/.
actual file is cdr201508271527 file after renaming ... (3 Replies)
Discussion started by: mfaizan40
3 Replies
LEARN ABOUT CENTOS
stap-merge
STAP-MERGE(1) General Commands Manual STAP-MERGE(1)
NAME
stap-merge - systemtap per-cpu binary merger
SYNOPSIS
stap-merge [ OPTIONS ] [ INPUT FILENAMES ]
DESCRIPTION
The stap-merge executable applies when the -b option has been used while running a stap script. The -b option will generate files per-cpu,
based on the timestamp field. Then stap-merge will merge and sort through the per-cpu files based on the timestamp field.
OPTIONS
The systemtap merge executable supports the following options.
-v Verbose mode, displays three extra fields per set of collected data.
[cpunumber,sequencenumberofdata,thelengthofthedataset]
-o OUTPUT_FILENAME
Specify the name of the file you would like the output to be redirected into. If this option is not specified than the output will
be pushed to standard out.
EXAMPLES
$ stap -v -b -e 'probe syscall.open { printf("%s(%d) open
",
execname(), pid()) }'
This should result in several stpd_cpu files (each labled with a number representing which cpu the file was produced from).
$ stap-merge -v stpd_cpu0 stpd_cpu1
Running the stap-merge program in the same directory as the stap script earlier in the example, will produce an ordered sequence of packets
with the three part label for each set of data. This result will be pushed through the standard output. An output file could have been
specified using the "-o" option.
FILES
Important files and their corresponding paths can be located in the
stappaths(7) manual page.
SEE ALSO
stapprobes(3stap),
stappaths(7),
staprun(8),
stapvars(3stap),
stapex(3stap),
stap-server(8),
gdb(1)
BUGS
Use the Bugzilla link of the project web page or our mailing list. http://sourceware.org/systemtap/,<systemtap@sourceware.org>.
STAP-MERGE(1)