Mike Green's Little Helpers

Me logo
Table of Contents|Main|Site Map

Excel 97+

To check datasource on a pivot table - cursor selected part of pivot table - select vba edit - Immediate window type:

?ActiveCell.PivotTable.PivotCache.Connection

To change datasource - remove ? and enclose changed connection in double quotes

find

Unix

find . -name '*.c' -print -exec grep whatever {} \;

parameter expansion

${#var}

{var##pattern} if pattern matches start of value

{var%%pattern} if pattern matches end of value

sed

sed '/TRL/d' file > file1.tmp

AWK

awk -f BIssr.awk PG=60 AC=$ACCOUNT DT=$PRINT_DATE BI${ACCOUNT}ssr.txt >/tmp/BI

"BIssr.awk" [Read only] 23 lines, 605 characters

BEGIN { FS ="|";rows=0 ;linecnt=100

}



$0 !~ / SSRAGENT/ {

if ( $1 !~ /----/ )

{

rows++

linecnt++

if ( linecnt > PG )

{

linecnt=0

printf(" SSR Items with No Match on NTCS for %.3s on %.10s\n",AC,DT)

print "Agent / GIN Value Entry Value NTCS Info Match "

print "Sett. Ref Date Date Criteria"

}

crit = ($8 ~ "0") ? "NONE" : "MANY"

info = ($7 ~ "NULL") ? " " : $7

printf("%15.15s %-7.7s %7.7s%7.7s %10.2f%.3s%-.20s %.4s\n", $1,$2,$3,$4,$5,$6,info,crit)

}

}

END { printf("Number of mismatches: %d\n",rows) }



bookmarkelets

Javascript

"javascript:t='

';c=new Array ('00','33','66','99','CC','FF');for(i=0;i<6;i++){for(j=0;j<6;j++){t+='';for(k=0;k<6;k++){L=c[i]+c[j]+c[k];t+=''}t+=''}}document.write(t+'
'+L+'
');void(document.close())"

Valid XHTML 1.0 Transitional