Search Results

Search: Posts Made By: sam@sam
Forum: Red Hat 07-04-2013
2,951
Posted By Don Cragun
Try something like: awk ' $1 ==...
Try something like:
awk '
$1 == "</cisco:subportname>" {
p = 0
next
}
p
$1 == "<cisco:subportname>" {
p = 1
}' file
If you are using a Solaris system, use...
9,164
Posted By MadeInGermany
Have $var in quotes: "$password"
Have $var in quotes: "$password"
4,004
Posted By RavinderSingh13
Hello sam@sam, Could you please let me know...
Hello sam@sam,

Could you please let me know if this helps you.

free -m | awk 'NR==2{val=$2;next} NR==3{printf("Memory Usage: %.2f%\n", ($3*100)/val)}'
Thanks,
R. Singh
5,702
Posted By bakunin
OK, now we're talking. From the output you...
OK, now we're talking.

From the output you provided i read it like this:

You have 15G or RAM, of which ~14G are in (various) use, ~650M are unused. Of the 14G of used RAM ~2.5G are used for...
1,264
Posted By disedorgue
Ok, as suggered by RudiC, you can use case: ...
Ok, as suggered by RudiC, you can use case:
#!/bin/ksh
set -x
while read server
do
var=`/usr/bin/curl-u user:password http://$server 2>&1`
case "$var" in
...
1,264
Posted By disedorgue
Hi, You defined var=denied, so you can...
Hi,
You defined var=denied, so you can simplified your code to:
#!/bin/ksh
set -x
while read server
do
var=denied
echo "$server invalidcred"
done < numRegards.
1,528
Posted By RudiC
Try awk '{val=(($3+0)-($4+0))/(1024*1024*1024)}...
Try awk '{val=(($3+0)-($4+0))/(1024*1024*1024)} val > 1.3 {printf "%s %s %s %s %.1f %s %s %s %s %s\n", $1,$2,$3,$4,val,$5,$6,$7,$8,$9 | "sort -k5,5nr | head -1"}' file
2015-01-19 00:14:25 4233428992...
1,528
Posted By Aia
substitute the `print' for `printf "%s %s %s %s...
substitute the `print' for `printf "%s %s %s %s %.1f %s %s %s %s %s\n", '
You may be able to combine some of those `%s' into one as I did in post #2
By the way, cat sam | is not necessary, since...
2,776
Posted By Don Cragun
Perhaps something like: /usr/xpg4/bin/awk...
Perhaps something like:
/usr/xpg4/bin/awk 'NF{printf("%s %s %u %u %u %u %u %u %u\n",$1,$2,"0x"$4,"0x"$5,"0x"$6,"0x"$7,"0x"$8,"0x"$9,"0x"$10)}' hexconv
Making a wild guess (since you didn't show us...
2,971
Posted By RavinderSingh13
Hello sam@sam, Could you please try...
Hello sam@sam,

Could you please try following and let us know if this helps.

START=`date +"%T" | awk -F":" '{print $2 FS $3}'`
##### I ran following command after few mins
END=`date +"%T" |...
2,583
Posted By Aia
Hi sam@sam, You are asking why currpids_71...
Hi sam@sam,

You are asking why currpids_71 contains only the third value(dell 457). This occurs because currpids_71 gets overwritten each time through the loop.

Since you are using bash you can...
2,583
Posted By Aia
Hi sam@sam, Is it possible for you to post a...
Hi sam@sam,

Is it possible for you to post a few lines from the output of these commands without the rest of the pipes?
ssh -n $poihostname /usr/ucb/ps -awwx | egrep "java|sys1"
and
ssh -n...
2,583
Posted By fpmurphy
These two lines can be reduced from: ssh -n...
These two lines can be reduced from:

ssh -n $poihostname /usr/ucb/ps -awwx | egrep "java|sys1" | awk '{print $1,$5}' > file1
cat file1 | awk -F/ '{print $1,$3}' > file2

to

ssh -n...
Showing results 1 to 13 of 13

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