Search Results

Search: Posts Made By: castrojc
1,320
Posted By Don Cragun
Try this: awk ' d==0 { a1[$0] next...
Try this:
awk '
d==0 { a1[$0]
next
}
{ a2[$0]
}
END { for(i in a1)
if(!(i in a2))
print i
}' dir1/* d=2 dir2/*
As always, if you're...
3,808
Posted By rdrtx1
Maybe awk version does not support delete. try: ...
Maybe awk version does not support delete. try:
awk '
!f[FILENAME] {for (i in t) if (!a[i]) {t[i]=""} ;
for (i in a) a[i]="";
f[FILENAME]=FILENAME
}
NR==FNR {t[$0]=$0}
{a[$0]=$0}
END {...
2,132
Posted By rdrtx1
try using bipinajith's first example: var=105 ...
try using bipinajith's first example:
var=105
awk -F'|' -v X=$var '$NF>=X{print $1,$NF}' OFS='|' filename
2,132
Posted By Yoda
awk -F'|' -v X=105 '$NF>=X{print $1,$NF}' OFS='|'...
awk -F'|' -v X=105 '$NF>=X{print $1,$NF}' OFS='|' filename
Or simply
awk -F'|' '$NF>=105{print $1,$NF}' OFS='|' filename
1,601
Posted By Yoda
Using shell script:- while read url ts do ...
Using shell script:-
while read url ts
do
dt=$( echo $ts | cut -c 1-8 )
echo $url $ts $( date -d "$dt" +"%A" )
done < infile
2,407
Posted By radoulov
Sorry for the delay, another one: awk 'END {...
Sorry for the delay, another one:

awk 'END {
for (i = 0; ++i <= NR;) {
split(data[i], t)
print count[t[1]] "=" data[i]
}
}
{
count[$1]++
data[NR] = $0
}' infile | ...
2,407
Posted By RudiC
Looong pipe chain, but avoiding awk:$ cut -f1 -d'...
Looong pipe chain, but avoiding awk:$ cut -f1 -d' ' file1|uniq -c|sort -r|cut -d' ' -f8|while read x; do grep "$x" file1|sort -k2; done
dog 1
dog 3
dog 5
dog 9
cat 1
cat 3
cat 7
ape 2
ape 4...
Showing results 1 to 7 of 7

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