yield(2) System Calls yield(2)NAME
yield - yield execution to another lightweight process
SYNOPSIS
#include <unistd.h>
void yield(void);
DESCRIPTION
The yield() function causes the current lightweight process to yield its execution in favor of another lightweight process with the same or
greater priority.
SEE ALSO thr_yield(3C)SunOS 5.11 20 Jul 1993 yield(2)
Check Out this Related Man Page
Mason::Filters::Standard(3pm) User Contributed Perl Documentation Mason::Filters::Standard(3pm)NAME
Mason::Filters::Standard - Standard filters
DESCRIPTION
These filters are automatically composed into Mason::Component.
FILTERS
Capture ($ref)
Uses "$m->capture" to capture the content in $ref instead of outputting it.
% $.Capture(my $content) {{
<!-- this will end up in $content -->
% }}
... do something with $content
CompCall ($path, @args...)
Calls the component with path and @args, just as with "$m->scomp", with an additional coderef argument "yield" that can be invoked to
generate the content. Arguments passed to "yield" can be accessed inside the content via @_. This is the replacement for Mason 1's
Components With Content <http://search.cpan.org/perldoc?HTML::Mason::Devel#Component_Calls_with_Content>.
In index.mc:
% $.CompCall ('list_items.mi', items => @items) {{
<li><% $_[0] %></li>
% }}
In list_items.mi:
<%class>
has 'items';
has 'yield';
</%class>
% foreach my $item (@{$.items}) {
<% $.yield->($item) %>
% }
NoBlankLines
Remove lines with only whitespace from content. This
% $.NoBlankLines {{
hello
world
% }}
yields
hello
world
Repeat ($count)
Repeat the content block $count times. Note that the block is re-executed each time, which may result in different content.
<!-- Prints 1 to 5 -->
% my $i = 1;
% $.Repeat(5) {{
<% $i++ %><br>
% }}
Tee ($ref)
Uses "$m->capture" to capture the content in $ref, and also output it.
% $.Tee(my $content) {{
<!-- this will end up in $content and also be output -->
% }}
...
<!-- output content again down here -->
<% $content %>
Trim
Remove whitespace from the beginning and end of the content.
SEE ALSO
Mason::Manual::Filters, Mason
AUTHOR
Jonathan Swartz <swartz@pobox.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Jonathan Swartz.
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-05-02 Mason::Filters::Standard(3pm)
Dear all,
In a bash script, I grep a filename from an UTF8 encoded file:
LIST=`grep ^source $FILE | tr "\t" " " | cut -d " " -f 2 | sed -e 's,~,\$HOME,g'`
The result is
# echo $LIST
$HOME/.mail_aliases_seminaire_MMMG
Then I try to access it:
#ls $LIST
ls: cannot access... (3 Replies)
I'm trying to execute something like this:
exec perl -i -pe 's/\015/\012/g' '${file}'
in my expect script and I get:
error "invalid command name \"perl\".
however, if I run
perl -i -pe 's/\015/\012/g' "/Users/Shared/menu-items.txt"
directly in my terminal, it runs fine. I'm an... (4 Replies)
Discussion started by: dpouliot
4 Replies
3. Forum Support Area for Unregistered Users & Account Problems
If one enters a Google search query like
site:unix.com mysql php
and clicks on the resulting link, one gets the message below:
vBulletin Message
No Thread specified. If you followed a valid link, please notify the administrator (2 Replies)
I have two Linux machines, Linux1 and Linux2. They both have two NFS mounts. We'll call them /scratch1 and /scratch2. And they both reside on the same NetApp filer. If I copy a 512Mb file from /scratch1 to /scratch2 while logged on Linux1 it takes 40s. However if I scp this file from... (1 Reply)
Good evening, Im newbie at unix specially with awk
From an scheduler program called Autosys i want to extract some data reading an inputfile that comprises jobs names, then formating the output to columns for example
1.
This is the inputfile:
$ more MapaRep.txt
ds_extra_nikira_usuarios... (18 Replies)
In this script:
#!/bin/bash
# bird
read -p "Enter name of a bird "
REPLY=$REPLY
birdname="duck sparrow hawk"
for i in $birdname
do
if ]
then
echo "Yes, that is a bird."
else
echo "That is not a bird."
fi
done
I get... (9 Replies)