Sponsored Content
Top Forums Programming C system() how to send the output to an array?? Post 302387944 by Jess83 on Tuesday 19th of January 2010 02:02:39 AM
Old 01-19-2010
C system() how to send the output to an array??

Hi, im in need if wisdom here guys...

How could I store the output of commands like ping integrally directly into a array??? I'll be using system() to run the commands but how can I send the output to an array??? cuz I need to store it so that I can later copy the array's content to a buffer that will then be sent via sockets.
 

10 More Discussions You Might Find Interesting

1. Programming

can we send arguments to system() call

Hi friends my C code is int main() { system("cp <source> <destination>"); } my question is how to set variables for <source> and <destination> how can we pass it to system() call. can you suggest me thankyou kingskar (6 Replies)
Discussion started by: kingskar
6 Replies

2. UNIX for Advanced & Expert Users

To send a message to another system

How to send a message to another unix terminal along with the date specified (4 Replies)
Discussion started by: aajan
4 Replies

3. UNIX for Dummies Questions & Answers

send message to a remote system

I am analyzing snoop output and want to send "Hello world" to a remote system. I want to see if the message received is encrypted or not. can I use ping to send a text message? like ping "helloworld" <IP Addr> Please help. Thank you (5 Replies)
Discussion started by: rakeshou
5 Replies

4. Solaris

how to send the output

Hi, how to send the output of a command directly to a file. For eg: am issuing metastat -a. How to send the output of this command to a file as well as mail. (3 Replies)
Discussion started by: rogerben
3 Replies

5. Shell Programming and Scripting

awk - Pre-populating an array from system command output

So, here's a scenario that requires the same logic as what I'm working on: Suppose that you have a directory containing files named after users. For awk's purposes, the filename is a single field-- something parse-friendly, like john_smith. Now, let's say that I'd like to populate an array in... (2 Replies)
Discussion started by: treesloth
2 Replies

6. Shell Programming and Scripting

System Output in to an Array or variable

hey guys in only new to scripting as such, but i have a problem. i want to take the output of a search i do in the command line to then be in a variable but only a certain part of the output. this this what im doing: -bash-2.05b$ ldapsearch -x '(dn:=dc)' dc|grep dc= # base... (1 Reply)
Discussion started by: jmorey
1 Replies

7. Filesystems, Disks and Memory

iostat output vs TPC output (array layer)

Hi Guys, I've been having some arguments with my colleagues about one thing. Always my thought was that as as far as disk performance is concern by looking at the output of the iostat command (AIX) you would be able to identify if you have a hot disk and then by moving some files out that disk... (3 Replies)
Discussion started by: arizah
3 Replies

8. UNIX for Dummies Questions & Answers

[Solved] Reading Array And Send An Email

I am trying to find an example for reading an array instead of reading a file and send out an email in ksh. Can you please help is that possible? Algorithm #!/bin/ksh i=0 set -A ARR if then let i=$ ARR="A does n't match with B" fi if then let i=$ ARR="P does n't match with Q"... (11 Replies)
Discussion started by: Ariean
11 Replies

9. UNIX for Dummies Questions & Answers

Send files automatically to a remote system

Greetings, basically what I want to do is take the standard error from a cron file and store it on a file in a remote host (from Solaris to Linux). I want to create a cron file to do this everyday or put it on a script that will send it everyday to the other system (that doesnt matter). Any ideas... (2 Replies)
Discussion started by: picolin
2 Replies

10. Shell Programming and Scripting

I want query output to send on mail using table tag and output should be in table

#! /bin/ksh #] && . ./.profile 2>/dev/null if test -f '.profile'; then . ./.profile; fi; #. .profile LOG_DIR=/app/rpx/jobs/scripts/just/logs sendEmail() { pzCType="$1"; pzTitle="$2"; pzMsg="$3"; pzFrom="$4"; pzTo="$5"; pzFiles="$6"; pzReplyTo="$7" ( ... (21 Replies)
Discussion started by: ankit.mca.aaidu
21 Replies
FFTW-WISDOM(1)							       fftw							    FFTW-WISDOM(1)

NAME
fftwl-wisdom - create wisdom (pre-optimized FFTs) SYNOPSIS
fftwl-wisdom [OPTION]... [SIZE]... DESCRIPTION
fftwl-wisdom is a utility to generate FFTW wisdom files, which contain saved information about how to optimally compute (Fourier) trans- forms of various sizes. FFTW is a free library to compute discrete Fourier transforms in one or more dimensions, for arbitrary sizes, and of both real and complex data, among other related operations. More information on FFTW can be found at the FFTW home page: http://www.fftw.org Programs using FFTW can be written to load wisdom from an arbitrary file, string, or other source. Moreover, it is likely that many FFTW- using programs will load the system wisdom file, which is stored in /etc/fftw/wisdoml by default. fftwl-wisdom can be used to create or add to such wisdom files. In its most typical usage, the wisdom file can be created to pre-plan a canonical set of sizes (see below) via: fftwl-wisdom -v -c -o wisdoml (this will take many hours, which can be limited by the -t option) and the output wisdoml file can then be copied (as root) to /etc/fftw/ or whatever. The fftwl-wisdom program normally writes the wisdom directly to standard output, but this can be changed via the -o option, as in the exam- ple above. If the system wisdom file /etc/fftw/wisdoml already exists, then fftwl-wisdom reads this existing wisdom (unless the -n option is speci- fied) and outputs both the old wisdom and any newly created wisdom. In this way, it can be used to add new transform sizes to the existing system wisdom (or other wisdom file, with the -w option). SPECIFYING SIZES
Although a canonical set of sizes to optimize is specified by the -c option, the user can also specify zero or more non-canonical transform sizes and types to optimize, via the SIZE arguments following the option flags. Alternatively, the sizes to optimize can be read from standard input (whitespace-separated), if a SIZE argument of "-" is supplied. Sizes are specified by the syntax: <type><inplace><direction><geometry> <type> is either 'c' (complex), 'r' (real, r2c/c2r), or 'k' (r2r, per-dimension kinds, specified in the geometry, below). <inplace> is either 'i' (in place) or 'o' (out of place). <direction> is either 'f' (forward) or 'b' (backward). The <direction> should be omitted for 'k' transforms, where it is specified via the geometry instead. <geometry> is the size and dimensionality of the transform, where different dimensions are separated by 'x' (e.g. '16x32' for a two-dimen- sional 16 by 32 transform). In the case of 'k' transforms, the size of each dimension is followed by a "type" string, which can be one of f/b/h/e00/e01/e10/e11/o00/o01/o10/o11 for R2HC/HC2R/DHT/REDFT00/.../RODFT11, respectively, as defined in the FFTW manual. For example, 'cif12x13x14' is a three-dimensional 12 by 13 x 14 complex DFT operating in-place. 'rob65536' is a one-dimensional size-65536 out-of-place complex-to-real (backwards) transform operating on Hermitian-symmetry input. 'ki10hx20e01' is a two-dimensional 10 by 20 r2r transform where the first dimension is a DHT and the second dimension is an REDFT01 (DCT-III). OPTIONS
-h, --help Display help on the command-line options and usage. -V, --version Print the version number and copyright information. -v, --verbose Verbose output. (You can specify this multiple times, or supply a numeric argument greater than 1, to increase the verbosity level.) Note that the verbose output will be mixed with the wisdom output (making it impossible to import), unless you write the wisdom to a file via the -o option. -c, --canonical Optimize/pre-plan a canonical set of sizes: all powers of two and ten up to 2^20 (1048576), including both real and complex, forward and backwards, in-place and out-of-place transforms. Also includes two- and three-dimensional transforms of equal-size dimensions (e.g. 16x16x16). -t hours, --time-limit=hours Stop after a time of hours (hours) has elapsed, outputting accumulated wisdom. (The problems are planned in increasing order of size.) Defaults to 0, indicating no time limit. -o file, --output-file=file Send wisdom output to file rather than to standard output (the default). -m, --measure; -e, --estimate; -x, --exhaustive Normally, fftwl-wisdom creates plans in FFTW_PATIENT mode, but with these options you can instead use FFTW_MEASURE, FFTW_ESTIMATE, or FFTW_EXHAUSTIVE modes, respectively, as described in more detail by the FFTW manual. Note that wisdom is tagged with the planning patience level, and a single file can mix different levels of wisdom (e.g. you can mostly use the patient default, but plan a few sizes that you especially care about in --exhaustive mode). -n, --no-system-wisdom Do not import the system wisdom from /etc/fftw/wisdoml (which is normally read by default). -w file, --wisdom-file=file Import wisdom from file (in addition to the system wisdom, unless -n is specified). Multiple wisdom files can be read via multiple -w options. If file is "-", then read wisdom from standard input. BUGS
Send bug reports to fftw@fftw.org. AUTHORS
Written by Steven G. Johnson and Matteo Frigo. Copyright (c) 2003, 2007-11 Matteo Frigo Copyright (c) 2003, 2007-11 Massachusetts Institute of Technology SEE ALSO
fftw-wisdom-to-conf(1) fftw February, 2003 FFTW-WISDOM(1)
All times are GMT -4. The time now is 06:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy