Search Results

Search: Posts Made By: seekryts15
3,241
Posted By Scrutinizer
Try: awk '$NF~/\.[0-9]+\./{if(NF>1) {p=$2;...
Try:
awk '$NF~/\.[0-9]+\./{if(NF>1) {p=$2; s=$0; next} if(p && $1!=p) {print s RS $0; p=x}}' file
3,241
Posted By rdrtx1
Will fail for input: Florida 13.7.24.25 ...
Will fail for input:
Florida 13.7.24.25
13.7.24.25
Chicago 13.17.12.5
uchicago
Nebraska
Tennessee 16.13.3.2
99.13.3.2
Frisco 15.35.18.1
Japan
Canada
France 18.55.7.25
18.55.7.25
3,241
Posted By RudiC
Good point, thanks! Small adaption:awk 'NR%2...
Good point, thanks! Small adaption:awk 'NR%2 {getline T; X = $NF; sub (X "$", ""); if (T != X && X T !~ /[^0-9.]/) printf "%s %s\n%s\n", X, $0, T}' file
15.235.18.21 No va
15.234.18.21...
3,241
Posted By RudiC
Howsoever, assuming awk is acceptable, try:awk...
Howsoever, assuming awk is acceptable, try:awk 'NR%2 {getline T; if (T != $2 && $2 T !~ /[^0-9.]/) printf "%s %s\n%s\n", $2, $1, T}' file
15.235.18.21 Nova
15.234.18.21
18.66.20.17 Vermont...
4,381
Posted By RavinderSingh13
Hello seekryts15, Could you please try...
Hello seekryts15,

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

cat script.ksh
Post=50
Testlist=`df -hP /tmp | awk 'FNR>1{sub("%",X,$5);print $5}'`
if [[ $Testlist -lt...
4,381
Posted By RudiC
Try TMP=$(echo $Post | sort - file | grep -n...
Try TMP=$(echo $Post | sort - file | grep -n $Post)
[ ${TMP%:*} -gt 1 ] && echo "there are numbers below the post threshold" || echo "tested good"
4,381
Posted By RavinderSingh13
Hello seekryts15, If I understood your...
Hello seekryts15,

If I understood your requirement correctly then you could try following and let me know if this helps you.

awk -vPOST="$post" '{A[$0]=$0} END{for(i in A){Q=i>POST?i " greater...
5,661
Posted By MadeInGermany
Assuming you entered TEST into A, you can precise...
Assuming you entered TEST into A, you can precise the filter with
echo "$ln" | grep -q "/${A}/" ...
5,661
Posted By RudiC
Did you consider 'SYS.TLOCK.* TEST$' as the...
Did you consider 'SYS.TLOCK.* TEST$' as the pattern? The $ sign indicates the line end.
2,127
Posted By Scrutinizer
Hi, try double quotes instead of single quotes,...
Hi, try double quotes instead of single quotes, otherwise $A does not get resolved:
find /home/testuser -name "$A*canvasON.txt"
8,266
Posted By Don Cragun
By changing: TESTSTATUS=`ps -ef | grep test |...
By changing:
TESTSTATUS=`ps -ef | grep test | grep -v grep | sed -e 's/^[ \t]*//'`

echo
echo
echo "\033[1;37 \033[1mAs soon as Test processes comes back up it will appear below:\033[0m\n"
...
8,266
Posted By RudiC
Your loop will never finish as TESTSTATUS will...
Your loop will never finish as TESTSTATUS will not change its state as it's not reassigned.
1,896
Posted By Don Cragun
Variable expansion does not happen inside a...
Variable expansion does not happen inside a quoted here document.

I don't think it is a good idea to throw away diagnostic messages from ex. If you just don't want to see the informative messages...
Showing results 1 to 13 of 13

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