Top Forums UNIX for Advanced & Expert Users How to Find the OS version Installed Post 42777 by pankschawla on Tuesday 4th of November 2003 05:25:51 AM
yes bcoz uname -a is not useful as it does not give the OS version in terms of July 20XX or March 20XX.
Test Your Knowledge in Computers #907
Difficulty: Easy
The Unix shell command line is a sequence of ASCII text words delimited by curly braces.
True or False?

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Which version of perl is installed on my system?

Hi, With the command perl -v i can see the perl version, but it's like a text file.. is there a command which could give me just the perl version number? i.e.: "5.8.1" thanks!! (6 Replies)
Discussion started by: kfad
6 Replies

2. Solaris

Setting link to newly installed Java version

Hi, I have Solaris 8 wih Java 1.2.2 as default. I just upgraded it to Java 2 version 1.4. But when I do "java -version: I get following: "Java version "1.2.2" Solaris VM (build Solaris_JDK_1.2.2_05a, native threads, sunjwit) How would I make solaris to look at my new java? If I have to... (4 Replies)
Discussion started by: harjitsingh
4 Replies

3. Shell Programming and Scripting

newer version of the parser installed,yet get the older one itlself,hows it possible?

Hi all, I downloaded a XML parser lib from Its the "libxml2",but i am having trouble initializing it(or so it feels)...I kind of need it badly as the OSE version of the virtualbox 1.6.2 will not install unless i have one The version was 2.6.3... The min requirement from... (0 Replies)
Discussion started by: wrapster
0 Replies

4. Red Hat

How to verify the current NIC driver version installed in RHEL5.3??

Guys, Can you help me how to verify the current installed NIC driver version in RHEL5.3? Thanks.:D (1 Reply)
Discussion started by: shtobias
1 Replies

5. Shell Programming and Scripting

installed java version ?

Hi, I want to know what version of the java is installed? Please let me know the command or process to identify the installed java version in sun solaris box. Thanks in advance for all your support. (3 Replies)
Discussion started by: sridhardwh
3 Replies

6. Shell Programming and Scripting

Portable Shell Script - Determine Which Version of Binary is Installed?

I currently have a shell script that utilizes the "Date" binary - this application is slightly different on OS X (BSD General Commmand) and Linux systems (gnu date). In particular, the version on OS X requires the following to get a date 14 days in the future "date -v+14d -u +%Y-%m-%d" where gnu... (1 Reply)
Discussion started by: colinjohnson
1 Replies

7. Solaris

Check that supersede of package version is installed

I need a programmatic way to check, that supersede of required package is installed. At Linux I do it using rpmvercm utility to compare installed package version to my minimal requirement. So - I need analog of Linux "rpmvercm" utility for Solaris (10/11) Let us say - I know that minimal version... (10 Replies)
Discussion started by: zuismanm
10 Replies

8. UNIX for Beginners Questions & Answers

Bash find version of an installed application but if none is found set variable to App Not Installed

Hello Forum, I'm issuing a one line bash command to look for the version of an installed application and saving the result to a variable like so: APP=application --version But if the application is not installed I want to return to my variable that the Application is not installed. So I'm... (2 Replies)
Discussion started by: greavette
2 Replies
PPI::Find(3)						User Contributed Perl Documentation					      PPI::Find(3)

PPI::Find - Object version of the Element->find method SYNOPSIS
# Create the Find object my $Find = PPI::Find->new( &wanted ); # Return all matching Elements as a list my @found = $Find->in( $Document ); # Can we find any matching Elements if ( $Find->any_matches($Document) ) { print "Found at least one matching Element"; } # Use the object as an iterator $Find->start($Document) or die "Failed to execute search"; while ( my $token = $Find->match ) { ... } DESCRIPTION
PPI::Find is the primary PDOM searching class in the core PPI package. History It became quite obvious during the development of PPI that many of the modules that would be built on top of it were going to need large numbers of saved, storable or easily creatable search objects that could be reused a number of times. Although the internal ->find method provides a basic ability to search, it is by no means thorough. PPI::Find attempts to resolve this problem. Structure and Style PPI::Find provides a similar API to the popular File::Find::Rule module for file searching, but without the ability to assemble queries. The implementation of a separate PPI::Find::Rule sub-class that does provide this ability is left as an exercise for the reader. The &wanted function At the core of each PPI::Find object is a "wanted" function that is passed a number of arguments and returns a value which controls the flow of the search. As the search executes, each Element will be passed to the wanted function in depth-first order. It will be provided with two arguments. The current Element to test as $_[0], and the top-level Element of the search as $_[1]. The &wanted function is expected to return 1 (positive) if the Element matches the condition, 0 (false) if it does not, and undef (undefined) if the condition does not match, and the Find search should not descend to any of the current Element's children. Errors should be reported from the &wanted function via die, which will be caught by the Find object and returned as an error. METHODS
new &wanted The "new" constructor takes a single argument of the &wanted function, as described above and creates a new search. Returns a new PPI::Find object, or "undef" if not passed a CODE reference. clone The "clone" method creates another instance of the same Find object. The cloning is done safely, so if your existing Find object is in the middle of an iteration, the cloned Find object will not also be in the iteration and can be safely used independently. Returns a duplicate PPI::Find object. in $Document [, array_ref => 1 ] The "in" method starts and completes a full run of the search. It takes as argument a single PPI::Element object which will serve as the top of the search process. Returns a list of PPI::Element objects that match the condition described by the &wanted function, or the null list on error. You should check the ->errstr method for any errors if you are returned the null list, which may also mean simply that no Elements were found that matched the condition. Because of this need to explicitly check for errors, an alternative return value mechanism is provide. If you pass the "array_ref =" 1> parameter to the method, it will return the list of matched Elements as a reference to an ARRAY. The method will return false if no elements were matched, or "undef" on error. The ->errstr method can still be used to get the error message as normal. start $Element The "start" method lets the Find object act as an iterator. The method is passed the parent PPI::Element object as for the "in" method, but does not accept any parameters. To simplify error handling, the entire search is done at once, with the results cached and provided as-requested. Returns true if the search completes, and false on error. match The "match" method returns the next matching Element in the iteration. Returns a PPI::Element object, or "undef" if there are no remaining Elements to be returned. finish The "finish" method provides a mechanism to end iteration if you wish to stop the iteration prematurely. It resets the Find object and allows it to be safely reused. A Find object will be automatically finished when "match" returns false. This means you should only need to call "finnish" when you stop iterating early. You may safely call this method even when not iterating and it will return without failure. Always returns true errstr The "errstr" method returns the error messages when a given PPI::Find object fails any action. Returns a string, or "undef" if there is no error. TO DO
- Implement the PPI::Find::Rule class SUPPORT
See the support section in the main module. AUTHOR
Adam Kennedy <> COPYRIGHT
Copyright 2001 - 2011 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.16.3 2011-02-26 PPI::Find(3)

Featured Tech Videos

All times are GMT -4. The time now is 07:02 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy