09-24-2008
Works for me with both mawk and classic awk. Which platform are you on?
If the match you did before didn't work correctly, and this doesn't work, you could try a simple sub(/%/, "", $5) to get rid of the percent sign.
10 More Discussions You Might Find Interesting
1. AIX
I am working in AIX 4.3.3 , here when we are doing one activity we ran out of space in one mount point, we need to increase the space in that mout point by reducing it in another mount point, can anybody help me out in carrying this activity.
Vipin (3 Replies)
Discussion started by: vipin77
3 Replies
2. UNIX for Dummies Questions & Answers
hi members...
another new probs...
i need to check all the zip files in the server and check for a space or "`" in the file name and if found need to remove them and form a zip file.
i tried using grep command to check for a space but with out success also when i tried checking for "`" as... (6 Replies)
Discussion started by: madhu_aqua14
6 Replies
3. Solaris
Hi,
I want to know the command which can be used for finding the % of disk space occupied by files & sub-folders inside a given mount in Sun Solaris
For eg: I have /tmp/ folder when I sat df -k it will give the percentage of space used by /tmp/.
Say if I want to see how much % the files &... (2 Replies)
Discussion started by: weblogicsupport
2 Replies
4. Linux
I am on Red Hat Linux 4.7.
I am getting this error message:
Preparing... ###########################################
You have insufficient diskspace in the destination directory (/usr/lib) to
install xxxxxxxxxxxxx. The installation requires at
least 1.5 GB free on this... (2 Replies)
Discussion started by: jxh461
2 Replies
5. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Im still pretty new to this and could really use some help with this task
"Write a script to check in the... (12 Replies)
Discussion started by: krolike
12 Replies
6. Shell Programming and Scripting
I have the below shell script which is checking /archlog mount point space on cappire(solaris 10) server. When the space usage is above 80% it should e-mail. When i tested this script it is working as expected.
-------------------------------------------------------------------------... (0 Replies)
Discussion started by: dreams5617
0 Replies
7. UNIX for Advanced & Expert Users
I have the below shell script which is checking /archlog mount point space on cappire(solaris 10) server. When the space usage is above 80% it should e-mail. When i tested this script it is working as expected.
#!/usr/bin/ksh
export MAIL_LIST="tlr.voora@zamn.com"
export ARCH_STATUS=`df -k... (1 Reply)
Discussion started by: dreams5617
1 Replies
8. HP-UX
Hi Gurus,
Please Help me to resolve below issue.
OS Version : HP-UX B.11.00 U 9000/800 62830930
When ever i try to mount following logical volumes, it throws me error.
mount -a
vxfs mount: /dev/datavg1/lvusr40 is corrupted. needs checking
vxfs mount: /dev/datavg1/lvusr38 is... (2 Replies)
Discussion started by: Justin John
2 Replies
9. Solaris
Hello.
My name is Alex and I am new to the UNIX environment.
One of the things that I do on a daily basis is I perform backups to tape on a Sun Ultra 25. I use DAT72 tape.
The tape that is currently in the tape drive has about five database backups within it already. I was just hoping... (19 Replies)
Discussion started by: daddy.torres
19 Replies
10. Shell Programming and Scripting
Hi,
When i check the cifs = cifs i could get two dupliates of cifs present in unix. so the system couldnt check. could you please let me know how to make the change code to find out the unique one in the line 6.
1NTBD="/ft/sv/ss"
2check_ntfs()
3{
4 # Check that the necessary NT areas are... (1 Reply)
Discussion started by: keerthi2016
1 Replies
LEARN ABOUT DEBIAN
accessors::classic
accessors::classic(3pm) User Contributed Perl Documentation accessors::classic(3pm)
NAME
accessors::classic - create 'classic' read/write accessor methods in caller's package.
SYNOPSIS
package Foo;
use accessors::classic qw( foo bar baz );
my $obj = bless {}, 'Foo';
# always return the current value, even on set:
$obj->foo( 'hello ' ) if $obj->bar( 'world' ) eq 'world';
print $obj->foo, $obj->bar, $obj->baz( "!
" );
DESCRIPTION
The accessors::classic pragma lets you create simple classic Perl accessors at compile-time.
The generated methods look like this:
sub foo {
my $self = shift;
$self->{foo} = shift if (@_);
return $self->{foo};
}
They always return the current value.
Note that there is no dash ("-") prepended to the property name as there are in accessors. This is for backwards compatibility.
PERFORMANCE
There is little-to-no performace hit when using generated accessors; in fact there is usually a performance gain.
o typically 5-15% faster than hard-coded accessors (like the above example).
o typically 1-15% slower than optimized accessors (less readable).
o typically a small performance hit at startup (accessors are created at compile-time).
o uses the same anonymous sub to reduce memory consumption (sometimes by 80%).
See the benchmark tests included with this distribution for more details.
CAVEATS
Classes using blessed scalarrefs, arrayrefs, etc. are not supported for sake of simplicity. Only hashrefs are supported.
AUTHOR
Steve Purkis <spurkis@cpan.org>
SEE ALSO
accessors, accessors::rw, accessors::ro, accessors::chained, base
perl v5.12.4 2011-10-16 accessors::classic(3pm)