Sponsored Content
Top Forums UNIX for Advanced & Expert Users Need information about System V & Berkley Syntax for Unix Post 302122722 by vibhor_agarwali on Thursday 21st of June 2007 05:13:16 AM
Old 06-21-2007
Bacially, I don't have any idea on that.

Just wanted to know what are they.

Thanks
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

AIX System information

Hi All, I am new to Unix and am working on AIX ( rs6000 ). I am looking for the system info of the unix box like 1. Number of CPUs 2. CPU speed 3. RAM size Your help is much appreciated Thanks rao. (6 Replies)
Discussion started by: rao
6 Replies

2. What is on Your Mind?

Some Sweeping, General Information from AT&T

Click here. (5 Replies)
Discussion started by: Perderabo
5 Replies

3. HP-UX

System Information

How do I get the system information on a HP UNIX server. details like CPU speed, number of processors etc. (4 Replies)
Discussion started by: Olamide
4 Replies

4. HP-UX

HP-UX system information

Hi, I'm writing a script to display a lot of information which describe a server (OS distrib, release, Hardware platform, CPU, HD, S/N...). For Linux side it is ok as you have almost all the information in /proc/cpuinfo, /proc/meminfo... and you can use dmidecode but for HP-UX I didn't find... (13 Replies)
Discussion started by: biker007fr
13 Replies

5. UNIX for Dummies Questions & Answers

Information about Unix System Administration

I'm a newbie so I'm not sure if I'm posting this in the right section... if I didn't, please forgive me :) I've been looking all over the web for information on system administration. I'd like to become a Unix System Administrator but I want to find some more info about the job. Can someone please... (54 Replies)
Discussion started by: hpicracing
54 Replies

6. BSD

How to get the FreeBsd system information?

Hi, How to get the FreeBsd system hardware and software basic information using terminal command with guest login? Here below i have specified some of the information i need. Please have a look at this and guide me. OS Name: OS Version : OS Manufacturer: OS... (2 Replies)
Discussion started by: forumguest
2 Replies

7. IP Networking

Berkley Packet Filter

Hi Folks! Im trying to write a packet capture filter on a opnet device. The syntax there to write this filter is BPF. What I wanna do is to capture everything, but from a certain ip-range I just wanna capture the header and not the payload. For your understanding: We are writing our backup to... (1 Reply)
Discussion started by: ati
1 Replies

8. UNIX and Linux Applications

Help with AT&T UNIX SYSTEM V Version 4 Console Login

Hello I install AT&T UNIX System V Release 4 Version 2.1 (3.5) on Emulator Bochs 2.6.8 here I done with all Base .img file upload after uploading 10 the base img file System take restart and after that System ask for console Login. which is as root and password set by me. But it will NOT allow... (7 Replies)
Discussion started by: Akshay Nalange
7 Replies
Syntax::Keyword::Gather(3pm)				User Contributed Perl Documentation			      Syntax::Keyword::Gather(3pm)

NAME
Syntax::Keyword::Gather - Provide a gather keyword VERSION
version 1.001000 SYNOPSIS
use Syntax::Keyword::Gather; my @list = gather { # Try to extract odd numbers and odd number names... for (@data) { if (/(one|three|five|seven|nine)$/) { take qq{'$_'} } elsif (/^d+$/ && $_ %2) { take $_ } } # But use the default set if there aren't any of either... take @defaults unless gathered; } or to use the stuff that Sub::Exporter gives us, try # this is a silly idea use syntax gather => { gather => { -as => 'bake' }, take => { -as => 'cake' }, }; my @vals = bake { cake (1...10) }; DESCRIPTION
Perl 6 provides a new control structure -- "gather" -- that allows lists to be constructed procedurally, without the need for a temporary variable. Within the block/closure controlled by a "gather" any call to "take" pushes that call's argument list to an implicitly created array. "take" returns the number of elements it took. This module implements that control structure. At the end of the block's execution, the "gather" returns the list of values stored in the array (in a list context) or a reference to the array (in a scalar context). For example, instead of writing: print do { my @wanted; while (my $line = <>) { push @wanted, $line if $line =~ /D/; push @wanted, -$line if some_other_condition($line); } push @wanted, 'EOF'; join q{, }, @wanted; }; instead we can write: print join q{, }, gather { while (my $line = <>) { take $line if $line =~ /D/; take -$line if some_other_condition($line); } take 'EOF'; } and instead of: my $text = do { my $string; while (<>) { next if /^#|^s*$/; last if /^__[DATA|END]__ $/; $string .= $_; } $string; }; we could write: my $text = join q{}, gather { while (<>) { next if /^#|^s*$/; last if /^__[DATA|END]__ $/; take $_; } }; There is also a third function -- "gathered" -- which returns a reference to the implicit array being gathered. This is useful for handling defaults: my @odds = gather { for @data { take $_ if $_ % 2; take to_num($_) if /[one|three|five|nine]$/; } take (1,3,5,7,9) unless gathered; } Note that -- as the example above implies -- the "gathered" function returns a special Perl 5 array reference that acts like a Perl 6 array reference in boolean, numeric, and string contexts. It's also handy for creating the implicit array by some process more complex than by simple sequential pushing. For example, if we needed to prepend a count of non-numeric items: my @odds = gather { for @data { take $_ if $_ %2; take to_num($_) if /[one|three|five|seven|nine]$/; } unshift gathered, +grep(/[a-z]/i, @data); } Conceptually "gather"/"take" is the generalized form from which both "map" and "grep" derive. That is, we could implement those two functions as: sub map (&@) { my $coderef = shift; my @list = @{shift @_}; return gather { take $coderef->($_) for (@list) }; } sub grep (&@) { my $coderef = shift; my @list = @{shift @_}; return gather { take $_ if $coderef->($_) for @list }; } A "gather" is also a very handy way of short-circuiting the construction of a list. For example, suppose we wanted to generate a single sorted list of lines from two sorted files, but only up to the first line they have in common. We could gather the lines like this: my @merged_diff = gather { my $a = <$fh_a>; my $b = <$fh_b>; while(1) { if ( defined $a && defined $b ) { if ($a eq $b) { last } # Duplicate means end of list elsif ($a lt $b) { take $a; $a = <$fh_a>; } else { take $b; $b = <$fh_b>; } } elsif (defined $a) { take $a; $a = <$fh_a>; } elsif (defined $b) { take $b; $b = <$fh_b>; } else { last } } } NAME
Syntax::Keyword::Gather - Implements the Perl 6 'gather/take' control structure in Perl 5 HISTORY
This module was forked from Damian Conway's Perl6::Gather for a few reasons. to avoid the slightly incendiary name =item to avoid the use of the Perl6::Exporter =item ~ doesn't overload to mean string context =item to no longer takes the current topic ($_) The last item is actually due to an unintended side-effect of the fact that if "take" has an array of zero length it takes $_, which is suprising at the very least. I'll fix that issue if I can. BUGS AND IRRITATIONS
It would be nice to be able to code the default case as: my @odds = gather { for (@data) { take if $_ % 2; take to_num($_) if /(?:one|three|five|nine)z/; } } or (1,3,5,7,9); but Perl 5's "or" imposes a scalar context on its left argument. This is arguably a bug and definitely an irritation. AUTHORS
o Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com> o Damian Conway COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Arthur Axel "fREW" Schmidt. 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.10.1 2011-02-25 Syntax::Keyword::Gather(3pm)
All times are GMT -4. The time now is 07:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy