When I run cfgadm in Solaris 8 on any server it shows all disks are failing. But all drives are ok and available.
Can someone tell me why?
/usr/sbin/cfgadm -avl
Ap_Id Receptacle Occupant Condition Information
When Type Busy Phys_Id
c0...
I am trying to use STL map like 'hash of arrays' in Perl.
For eg in Perl hash of array,
%HoA = (
flintstones => [ "fred", "barney" ],
jetsons => [ "george", "jane", "elroy" ],
simpsons => [ "homer", "marge", "bart" ],
);
print $HoA{flintstones}[0] ; # will give...
I have a directory of c source with names:
0.c , 1.c , 2.c, 3.c, 4.c, ..... 9.c, 10.c, 11.c
I do a glob on those files
and do a
foreach $file (@filelist)
print $file
I get the following which is not ordered:
0.c
1.c
10.c
11.c
2.c
3.c
4.c
5.c
..
..
9.c
Whereas I expect it to be
0.c
1.c...
icebox console login: Mar 10 11:28:16 icebox su: 'su root' succeeded for iceman"
Can somebody show me how to prevent the annoying console message above which appears whenever I su to root in my Sun workstation thruough ssh.
Determine OS and then adding module
#############
#!/usr/bin/perl
use POSIX qw(uname);
my $kernel = (uname)[0];
if ( ! $kernel =~ m/^Windows/) {
use Sun::Solaris::Kstat;
}
##############
i want to use a module by making sure its available first. Can somebody tell how to do that.
I am...
How to print last line of file?
The Perl cookbook uses this method:
@lines = <FILE>;
$lastline = pop @lines
However the above method requires the file to be loaded completely into an array(memory) and is not suitable for large files.
Tie::File module cannot also be used here since I am using...
open file for read
while file is true {
( if line =~ 09/02 ) >>> execute this statement once in this loop
start writing line to temp.txt
if line =~ 09/03 { break }
}
Is this possible in vbscript
I am trying to find files younger than 24 hours old in the /tmp directory.
-------------------------------
#!/usr/bin/perl -w
use strict;
use File::stat ;
opendir(D, "/tmp") or die $!;
my $time = time();
while (my $f = readdir(D)) {
next if $f =~ /^\./;
next unless $f =~...
I have in need of converting a CPAN module to a subroutine which I can add in my perl script. Can somebody give me guidelines to perform that.
Here is the code:
--------------< snip > ---------------------------
# File::ReadBackwards.pm
# Copyright (C) 2003 by Uri Guttman. All rights...
Can somebody tell how to block all incoming requests to a port(any port where lsof mentions LISTEN) in Sun Solaris 8 without even touching/restarting the "Listening" service. A scripting solution would be desired in this case.
I tried to put a comment /etc/services file and it didnt work. And...
I have a collection of text documents(ascii file name and the heading:
my %doc_collection = (
'joe.txt' => "Joes Collection"
'john.txt' => "Johnson's Collection"
'mary.txt' => "Mary's notes"
'liz.txt' => "Liz's articles"
.........
) ;
In order to open 'ONE' ascii document, say joe's...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.