Excel inline commands I use often

Concatenate three cells into one separated with a comma (trim trailing space and commas): =IF(TRIM(J2)=””,IF(TRIM(I2)=””,H2, TRIM(H2&”, “&I2)),TRIM(H2&”, “&I2&”, “&J2) ) Concatenate two cells into one separated with a comma (trim trailing space and commas): =IF(TRIM(L2)&TRIM(K2)=””,””,IF(TRIM(L2)=””, IF(TRIM(K2)=””,””,TRIM(K2&”, “&L2), )

My Unix Commands

Find text within files in sub directories find . -type f -exec grep -il “text string” {} ; Change the photo files name: for f in 100_*.jpg; do mv $f ${f/100_/p}; done Add an ‘s’ to thumbnail: for f in p*.jpg; do mv $f ${f/./s.}; done List all files including sub directories into file ‘a.txt’:… Continue reading My Unix Commands

unix commands – extract .gz files

Dang, I swear I look for these commands way too often. So here it is once and for all: Extract a .gz file: gzip -d file.gz Extract a tar.gz file: tar xvzf file.tar.gz Long live the internet!

My Unix Commands – Tree view of sub-directories

I found this line on centerkey.com: ls -R | grep “:$” | sed -e ‘s/:$//’ -e ‘s/[^-][^/]*//–/g’ -e ‘s/^/   /’ -e ‘s/-/|/’ It was very useful, and created simple graphic tree of my sub-directories. Live long the internet!