Memo quelques commandes bash

# php syntax checker

find . -iname '*.php' | sed 's/^/php -l /' | bash | egrep -v '^No'

# auto add translate fonction in html page content (appox)

sed -i  's/>\([^<">]*\)</><?= _translate("\1")?></g' *

#get

find . -type f | egrep '.(php|html|php)$' 
  | xargs cat 
  | sed  -e"s/_translate/\n_translate/g"   
  |  grep '^_translate' 
  | sed -e"s/\(.*\)\([\"'])\).*/\1/"  
  |  sed -e"s/_translate(.\(.*\)/\1/g" 
  | sort -u   
  | sed -e "s/\(.*\)[\"']).*/\1/" >  string.to.translates.csv

#TODO, coupling with xgetPo & co.