10-03-2011
perhaps you need to use undocumented parameter for vmchange:
"-sec 1"
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I am looking for a way to redirect the result from a command into a variable.
This is the scenario.
Using the find command I will be getting multiple records/lines back.
Here is the command I am using:
find /”path”/ -name nohup.out -print
This now is giving me the paths and file... (1 Reply)
Discussion started by: hugow
1 Replies
2. Shell Programming and Scripting
hi
I want to suppress the output of dos2unix command in my shell script. I'm using follwing command in my script
dos2unix somefile >/dev/null
But it's still showing output while executing the script.Please help me to sort this out
Thanks (4 Replies)
Discussion started by: nrbhole
4 Replies
3. Shell Programming and Scripting
hi,
i wat to get the output of a grep command in a file. but when i am trying out the same grep command in the unix prompt its working fine.. i am getting the output properly.. but when i am writing the same command inside my shell script , its just creating a new output file with no contents... (11 Replies)
Discussion started by: kripssmart
11 Replies
4. Programming
I have a Linux socket server program. I need to run the commands sent by the client and return the output to client. Is there a quicker way?
I tried with
ptr=popen(command, "r"); and then
fgets(buf, size,ptr);
write buf to socket
fgets hangs for me.
Now, I would like to know if I can... (3 Replies)
Discussion started by: rajeshomallur
3 Replies
5. UNIX and Linux Applications
Hi Everyone,
Can anyone please tell me, how can I redirect the grep command output to same file. I am trying with below command but my original file contains no data after executing the command.
$grep pattern file1 > file1
Kind Regards,
Eswar (5 Replies)
Discussion started by: picheswa
5 Replies
6. Shell Programming and Scripting
(/home/user1)-> more script.sh
#!/bin/ksh
( echo open devicename
sleep 3;
echo user;
sleep 2;
echo password;
sleep 2;
echo "/info/dump"; ---------> This needs to redirect to a file .Can be number of pages
sleep 2;
echo "exit" ) | telnet
Please use code tags next time for... (2 Replies)
Discussion started by: necro98
2 Replies
7. AIX
Hi All,.
We are using AIX as the OS to host the Oracle ERP. We have a command FNDLOAD which is used to load setups. When this command is run, it outputs names of log files and any errors to the screen.
I am trying to redirect this output to a file because we have large number of these... (4 Replies)
Discussion started by: mansmaan
4 Replies
8. Shell Programming and Scripting
Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions.
... (4 Replies)
Discussion started by: aix_admin_007
4 Replies
9. Shell Programming and Scripting
I would like to redirect output of command line in for loop as $line.
Output should be processed as line but instead it throw whole output.
Could somebody help me on how to redirect output of command line and process it line by line without sending output to any file.
below is my code ... (1 Reply)
Discussion started by: tapia
1 Replies
10. Shell Programming and Scripting
Hi Guys,
I want to redirect the output of 3 scripts to a file and then mail the output of those three scripts.
I used below but it is not working:
OFILE=/home/home1/report1
echo "report1 details" > $OFILE
=/home/home1/1.sh > $OFILE
echo... (7 Replies)
Discussion started by: Vivekit82
7 Replies
LEARN ABOUT DEBIAN
math::calc::units
Units(3pm) User Contributed Perl Documentation Units(3pm)
NAME
Math::Calc::Units - Human-readable unit-aware calculator
SYNOPSIS
use Math::Calc::Units qw(calc readable convert equal);
print "It will take ".calc("10MB/(384Kbps)")." to download
";
my @alternative_descriptions = readable("10MB/(384Kbps)");
print "A week is ".convert("1 week", "seconds")." long
";
if (equal("$rate bytes / sec", "1 MB/sec")) { ... };
DESCRIPTION
"Math::Calc::Units" is a simple calculator that keeps track of units. It currently handles combinations of byte sizes and duration only,
although adding any other multiplicative types is easy. Any unknown type is treated as a unique user type (with some effort to map English
plurals to their singular forms).
The primary intended use is via the "ucalc" script that prints out all of the "readable" variants of a value. For example, "3 bytes" will
only produce "3 byte", but "3 byte / sec" produces the original along with "180 byte / minute", "10.55 kilobyte / hour", etc.
The "Math::Calc::Units" interface only provides for string-based computations, which could result in a large loss of precision for some
applications. If you need the exact result, you may pass in an extra parameter 'exact' to "calc" or "convert", causing them to return a
2-element list containing the numerical result and a string describing the units of that result:
my ($value, $units) = convert("10MB/sec", "GB/day");
(In scalar context, they just return the numeric value.)
Examples of use
o Estimate transmission rates (e.g., 10MB at 384 kilobit/sec)
o Estimate performance characteristics (e.g., disk I/O rates)
o Figure out how long something will take to complete
I tend to work on performance-sensitive code that involves a lot of network and disk traffic, so I wrote this tool after I became very sick
of constantly converting KB/sec to GB/day when trying to figure out how long a run is going to take, or what the theoretical maximum
performance would be if we were 100% disk bound. Now I can't live without it.
Contraindications
If you are just trying to convert from one unit to another, you'll probably be better off with "Math::Units" or "Convert::Units". This
module really only makes sense when you're converting to and from human-readable values.
AUTHOR
Steve Fink <sfink@cpan.org>
SEE ALSO
ucalc, Math::Units, Convert::Units.
perl v5.10.0 2009-08-04 Units(3pm)