Did you really read my post?
I wanted to tell you this:
The function is named echo_ (not echo and not echo_!)
and has %s (not %q)
and has IFS and has a subshell.
It works like a plain echo but without taking any options (that are not portable):
i made a lot of processes. here is the code:
main()
{
printf("\nEnter K="); scanf("%d",&k);
printf("Enter L="); scanf("%d",&l);
printf("\nFather id=%d\n",getpid());
x=0;
makechild();
sleep(2);
return 1;
}
int makechild()
{
for(q=1;q<=k;q++)
{
if(f=fork())
{
... (5 Replies)
Hi,
I have a shell scripting. This will take 7 digit number in each line and add 7 digit number with next subsequent lines ( normal addition ).
Eg:
0000001
0000220
0001235
0000022
0000023
...........
.........
........
Like this i am having around 1500000 records. After adding... (23 Replies)
Hi I have a problem writing a c program that makes a telnet connection and writes some command.
The shell command is something like this:
------------------------------------------------------------------
>
>telnet 141.111.231.132 3300
ENTER COMMAND: login "<--- I' wirte a command (ex... (5 Replies)
Hi, guys:
I am working on my shell using c. How can I use pipe to implement the following?
ls -l 1>> | grep hellp 1<< 2>> | less 2<<
(the output of ls goes to grep, and the output of grep goes to less)
Thanks
Please use and tags when posting code, data or logs etc. to preserve... (1 Reply)
Hello everyone, I'm in need of some assistance. I'm currently enrolled in an introductory UNIX shell programming course and, well halfway through the semester, we are receiving our first actual assignment. I've somewhat realized now that I've fallen behind, and I'm working to get caught up, but for... (1 Reply)
Hi All,
I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command.
The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
Hi guys,
I need to know how i can ignore Pipe '|' if Pipe is coming as a column in Pipe delimited file
for eg:
file 1:
xx|yy|"xyz|zzz"|zzz|12...
using below awk command
awk 'BEGIN {FS=OFS="|" } print $3
i would get xyz
But i want as :
xyz|zzz to consider as whole column... (13 Replies)
Hello,
I have an ffmpeg bash script which is working nice and
I need to do the same for other sources.
To create new scripts and to deal with multiple bash files sounds not logical. It is a bit hard to manage for me..
I wondered if it was possible to make my input file as variable.
Then I... (1 Reply)
Discussion started by: baris35
1 Replies
LEARN ABOUT PHP
forward_static_call_array
FORWARD_STATIC_CALL_ARRAY(3) 1 FORWARD_STATIC_CALL_ARRAY(3)forward_static_call_array - Call a static method and pass the arguments as arraySYNOPSIS
mixed forward_static_call_array (callable $function, array $parameters)
DESCRIPTION
Calls a user defined function or method given by the $function parameter. This function must be called within a method context, it can't
be used outside a class. It uses the late static binding. All arguments of the forwarded method are passed as values, and as an array, sim-
ilarly to call_user_func_array(3).
PARAMETERS
o $function
- The function or method to be called. This parameter may be an array, with the name of the class, and the method, or a string,
with a function name.
o $parameter
- One parameter, gathering all the method parameter in one array.
Note
Note that the parameters for forward_static_call_array(3) are not passed by reference.
RETURN VALUES
Returns the function result, or FALSE on error.
EXAMPLES
Example #1
forward_static_call_array(3) example
<?php
class A
{
const NAME = 'A';
public static function test() {
$args = func_get_args();
echo static::NAME, " ".join(',', $args)."
";
}
}
class B extends A
{
const NAME = 'B';
public static function test() {
echo self::NAME, "
";
forward_static_call_array(array('A', 'test'), array('more', 'args'));
forward_static_call_array( 'test', array('other', 'args'));
}
}
B::test('foo');
function test() {
$args = func_get_args();
echo "C ".join(',', $args)."
";
}
?>
The above example will output:
B
B more,args
C other,args
SEE ALSO forward_static_call(3), call_user_func(3), call_user_func_array(3), is_callable(3), information about the callback type.
PHP Documentation Group FORWARD_STATIC_CALL_ARRAY(3)