Hi,
Is it possible to create a dynamic array in shell script. I am trying to get the list of logfiles that created that day and put it in a dynamic array. I am not sure about it. help me
New to scripting
Gundu (3 Replies)
i want to create an array
the array elements are populated depending upon the number of entries present in a data file
The data file is created dynamically
how to achieve the same
thanks (1 Reply)
I am facing a strange error while creating posix threads:
Given below are two snippets of code, the first one works whereas the second one gives a garbage value in the output.
Snippet 1
This works:
--------------
int *threadids;
threadids = (int *) malloc (num_threads * sizeof(int));
... (4 Replies)
I am wondering how I can save the file names (stored in $file or $fnames) in array which I can access with an index.
alias MATH 'set \!:1 = `echo "\!:3-$" | bc -l`'
set narg = $#argv
while ($iarg < $narg)
MATH iarg = $iarg + 1
set arg = $argv
set opt = ` echo $arg | awk... (1 Reply)
I have an interesting requirement. I have declaried an array like :-
arr=`find . ! -name "." | xargs -I {} echo {} | cut -c 2-${#}`
Then i will try to access the array elements like :-
i=0
for i in ${arr}; do
Here comes the confusions, the array elements are basically dir and files stored... (2 Replies)
Hi gurus,
I need to create arrays from variables, via a loop.
The issue I have is with the array name creation. How do I use a variable to define an array?
I want to do something like
declare -a $H
where $H is my loop variable.
I then need to add items to each array I've created,... (3 Replies)
I am having trouble creating an array, I've tried everything google gives me but it won't work, and it seems as though it should. Using Ubunto 12.04 and bash.
#!/bin/bash
ARRAY=one two three
echo ${ARRAY}When I do this I receive the error
: two: not found
and
: Bad substitution
When I... (3 Replies)
Dear community,
how can I create an array from file taking only the 4th field?
out.txt file is something like this:
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
17 18 19 20So the final array should be:
4 8 12 16 20With this command I created an array with all the fields, but I need only the 4th... (13 Replies)
Hi Guys,
I am writting a c shell script where I have to parse an input argument with options that could be an array. So far I have achieved where I could parse a single argument with option but failed when I try to create an array with the options. For example:
This is on terminal window:... (2 Replies)
Discussion started by: dixits
2 Replies
LEARN ABOUT OSF1
pdtostd
pdtostd(1) General Commands Manual pdtostd(1)NAME
pdtostd - Convert profiling data files to standard format
SYNOPSIS
pdtostd [-i] [-s] {[-a addrs] [-o outfile] infile}...
OPTIONS
Retain "int" sized (32-bit) sample counts instead of truncating to "short" sized (16-bit) counts, as in the uprofile -i command in DIGITAL
UNIX releases before V4.0. Split "int" sized (32-bit) sample counts into two "short" sized (16-bit) counts, so that default sample counts
collected by cc -p or cc -pg cover one instruction instead of two, as in DIGITAL UNIX releases before V4.0. If infile is a pixie-created
*.Counts file, then addrs is the name of a specific *.Addrs file to use. By default, pdtostd searches for a *.Addrs file in the location
where the pixie program created it. The named file must be a "profiling data file", as reported by the file(1) command, not a standard for-
mat *.Addrs file. Therefore, convert a *.Counts file before its *.Addrs file, unless using -o. The reformatted file is written to outfile
instead of overwriting infile. Each infile can be preceded by a -o option.
OPERANDS
The input file, which is a "profiling data file", as reported by the file(1) command, and was generated by a program instrumented or exe-
cuted by one of the following tools: (mon.out) (gmon.out) (kmon.out) (umon.out) (*.Addrs, *.Counts)
DESCRIPTION
The pdtostd command converts profiling data files from the format that the Tru64 UNIX profilers use into the older industry standard for-
mats. The converted files can then be processed by tools compiled with the <cmplrs/prof_header.h> or <sys/gprof.h> files.
The format of the profiling data files produced by Tru64 UNIX may be expanded in future releases, but Tru64 UNIX tools will continue to
support older formats. To write tools that process profiling data files, the pdtostd command lets you convert the Tru64 UNIX formats to the
older industry standard formats, where one exists.
The standard formats cannot accommodate the variety of data that is recorded in the "profiling data file" format, but instead they provide
the standard subset. The standard subset matches the format of the files output by the tools in DIGITAL UNIX systems before the V4.0
release.
For access to the full information in a Tru64 UNIX profiling data file, examine the file with the pddump(1) command, and process it with
the utilities in libpdf.a and <cmplrs/pdf.h>, skipping any new attributes, records, or fields that may appear.
EXAMPLES
Converts a V4.* default mon.out file to a pre-V4.0 default mon.out file, without overwriting the original. pdtostd -s -o mon.std mon.out
Converts pixie files, replacing the originals with the standard versions, even if the originals have been moved from the directory they
were created in. pdtostd -a example.Addrs example.Counts example.Addrs
FILES
Header file that defines the standard mon.out, kmon.out, and umon.out formats and the standard *.Addrs and *.Counts formats Header file
that defines the gmon.h standard format
SEE ALSO
Commands: atom(1), cc(1), file(1), kprofile(1), pddump(1), uprofile(1)
AtomTools: pixie(5)
Programmer's Guide
pdtostd(1)