Search Results

Search: Posts Made By: jaydeep_sadaria
1,654
Posted By Don Cragun
Try: awk ' $3 == "M" { if(m) print ll,...
Try:
awk '
$3 == "M" {
if(m) print ll, "DOWN"
ll = $0
m = 1
}
$3 == "*" {
print ll, $0
m = 0
}
END { if(m) print ll, "DOWN"
}' "IP FILE"
1,942
Posted By Akshay Hegde
$ awk 'NF!=9 && NF && !/SDIP/{$0=p FS...
$ awk 'NF!=9 && NF && !/SDIP/{$0=p FS $0}NF==9{p=$1}1' file
1,942
Posted By pilnet101
Are you on Solaris? Can you change awk to...
Are you on Solaris?

Can you change awk to nawk?

EDIT: And please copy the command once more, I updated it with an extra space so the formatting is correct.
1,457
Posted By Akshay Hegde
Try : $ awk...
Try :

$ awk '{split($2,S,":");split($4,E,":");print $0, ((S[1]*3600+S[2]*60+S[3])-(E[1]*3600+E[2]*60+E[3]))/3600}' file
2013-11-23 15:51:23 2013-11-23 12:20:06 BRC023 CG 3.52139
2013-11-23...
2,732
Posted By Scrutinizer
Try something like: awk 'sub("A1/EXT ",x){ p=$0...
Try something like:
awk 'sub("A1/EXT ",x){ p=$0 } /MO/{getline; p=p OFS $1 OFS $2} /EXTERNAL ALARM/{while(getline && NF) p=p OFS $0; print p}' file
Or
awk '/A1\/EXT/{ p=$2 OFS $3 OFS $4 OFS $5 }...
Showing results 1 to 5 of 5

 

Featured Tech Videos

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