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...
Sorry, if my question seemed vague. Its not about the digit, but the way the macro works. FYI. I am totally new to this macro thing.
I am trying to understand somebody else's code.
His code has the following:
#define is_dig(x) ((x) >= '0' && (x) <= '9')
is_dig(pattern[c]) ;
To my...
If you are using winsock in dev c++, u can use gethostname function which is cross platform:
#include <iostream>
#include <winsock.h>
using namespace std;
int main(int argc, char *argv[])
{
WSADATA wsa_data;
/* Load Winsock 2.0 DLL */
if (WSAStartup(MAKEWORD(2, 0), &wsa_data) !=...
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...
h, sorry, some additions... while (file) works fine in VC++ 6.0 STL, but after eof condition raised (try to read after EOF). Alas, in all snippets above (do ... while) loop body tries to "
This is a C++ in unix forum ;)
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.