Search Results

Search: Posts Made By: Marc G
2,319
Posted By Scrutinizer
Shell approach without external utilities.. ...
Shell approach without external utilities..

file=capturesummary.txt
# use a code block to direct the input file into the two consecutive while loops.
{
# while read dev, read the first part...
2,319
Posted By Yoda
Here is a complete program that might work for...
Here is a complete program that might work for you:
awk '
/^RP/ {
if ( device && E_port_type )
{
print "Device Name:", device
...
2,319
Posted By Yoda
You could do the whole thing simply using an awk...
You could do the whole thing simply using an awk program:
awk '
/^RP/ {
if ( device && port_type )
{
print "Device Name: ", device...
Forum: Solaris 03-26-2013
2,545
Posted By jlliagre
There is absolutely no reason for this command to...
There is absolutely no reason for this command to hang.
The cause would be a bug in your script or an issue with your environment.
It would help if you post your whole script content.

----------...
Forum: Solaris 03-25-2013
2,545
Posted By hanson44
I think you want to get rid of the unwanted lines...
I think you want to get rid of the unwanted lines BEFORE you cut.

And I think it's going to be more reliable to get the data (id or whatever) with cut -f to get the field you want.
$ vmstat 1 2...
Forum: Solaris 03-25-2013
2,545
Posted By jlliagre
Assuming you want the last column (idle cpu),...
Assuming you want the last column (idle cpu), here is one way to get it:

vmstat 1 2 | nawk 'NR==4{print $NF}'


That would be quite inefficient though to only extract a single value while I...
Forum: Solaris 03-19-2013
2,545
Posted By jlliagre
You might want to use "top -Z" which gives some...
You might want to use "top -Z" which gives some statistics per zone.

That's no surprise.
- "iowait" ceased to be reported by Solaris many years ago being quite confusing, meaningless and commonly...
1,501
Posted By DGPickett
You might want to capture your 'top' output once...
You might want to capture your 'top' output once in a file or env var, so all the commands get data from the same moment.
1,501
Posted By vbe
Well knowing what OS you are running may help a...
Well knowing what OS you are running may help a bit...
the top I see is the standard top utility?
Why initialize LD_LIBRARY since you are not using it ( I may be wrong but I see no program here...
947
Posted By Scrutinizer
Use spaces around the brackets: if [ -e...
Use spaces around the brackets:
if [ -e /usr/apps/vender/data/OSKPI/$FILE ]
1,480
Posted By Corona688
Looks like it. $ true && echo "command...
Looks like it.

$ true && echo "command succeeded" || echo "command failed"
command succeeded

$ false && echo "command succeeded" || echo "command failed"
command failed

$
1,305
Posted By Scott
2>&1 directs standard error to standard output. ...
2>&1 directs standard error to standard output.

For the "$dev 2 5" arguments you will need to read the manual page ("man ping") for your system. My system does not support that usage.

It would...
1,305
Posted By bartus11
Check man ping on that system (I'm guessing it is...
Check man ping on that system (I'm guessing it is Solaris) to get explanation of 5 2. 2>&1 is a redirection technique, allowing to "merge" standard error messages into standard output stream.
Forum: Solaris 12-13-2012
1,455
Posted By Corona688
$$ is a special variable meaning "the process ID...
$$ is a special variable meaning "the process ID of the current shell". If you quit and logged back in, you'd get a new one. It's not impossible for the same process ID to be repeated eventually,...
4,127
Posted By Scott
Is ksh your default shell? If not, then...
Is ksh your default shell?

If not, then you're not using ksh in your script:

# Initialize variables
#!/usr/bin/ksh

The "shebang" needs to be on the first line.

And the syntax is:

...
Showing results 1 to 15 of 15

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