Yeah i got it to work with popen the following way
Works fine on Gentoo but crashed to "segmentation fault" on Ubuntu and I foresee it do the same on MAC OS X due to memory protection... I dumped the core and ran it through gdb now I know its in the strcat() function so my understanding of it is that is that after buff is wrote once to nstat then nstat is then made into read only so when newline tries to be appended to nstat it can't then fails to segmentation fault right? How can I get around this? anyone??
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)
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)
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)
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)
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)
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)
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)
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)
Net::CLI::Interact::Action(3pm) User Contributed Perl Documentation Net::CLI::Interact::Action(3pm)NAME
Net::CLI::Interact::Action - Sent data or matched response from connected device
VERSION
version 1.121640
DESCRIPTION
This class is used internally by Net::CLI::Interact and it's unlikely that an end-user will need to make use of Action objects directly.
The interface is documented here as a matter of record.
An Action object represents either some kind of text or command to send to a connected device, or a regular expression matching the
response from a connected device. Such Actions are built up into ActionSets which describe a conversation with the connected device.
If the Action is a "send" type, then after execution it can be cloned and augmented with the response text of the command. If the response
is likely to be paged, then the Action may also store instruction in how to trigger and consume the pages.
INTERFACE
type
Denotes the kind of Action, which may be "send" or "match".
value
In the case of "send", a String command to send to the device. In the case of "match", a regular expression reference to match response
from the device. In special circumstances an array reference of regular expression references is also valid, and each will be checked for a
match against the device response.
no_ors
Only applies to the "send" kind. Whether to skip appending the output record separator (newline) to the "send" command when sent to the
connected device.
continuation
Only applies to the "send" kind. When response output is likely to be paged, this stores an ActionSet that contains two Actions: one for
the "match" which indicates output has paused at the end of a page, and one for the "send" command which triggers printing of the next
page.
params
Only applies to the "send" kind, and contains a list of parameters which are substituted into the "value" using Perl's "sprintf" function.
Insufficient parameters causes "sprintf" to die.
num_params
Only applies to the "send" kind, and returns the number of parameters which are required for the current "value". Used for error checking
when setting "params".
response
A stash for the returned prompt which matched and triggered the end of this action.
response_stash
A stash for the returned output following a "send" command, but not including the matched prompt which ended the action. This slot is used
by the "match" action as it slurps output, but the content is then transferred over to the partner "send" in the ActionSet.
prompt_hit
When a command is successfully issued, the response is terminated by a prompt. However that prompt can be one of a list, defined in the
Action. This slot records the regular expression from that list which was actually matched.
clone
Returns a new Action, which is a shallow clone of the existing one. All the reference based slots will share data, but you can add (for
example) a "response" without affecting the original Action. Used when preparing to execute an Action which has been retrieved from the
Phrasebook.
AUTHOR
Oliver Gorwits <oliver@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Oliver Gorwits.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-06-12 Net::CLI::Interact::Action(3pm)