Skip to content

Instantly share code, notes, and snippets.

@sandeepmukho
sandeepmukho / match_string_and_replace_in_files.sh
Last active December 24, 2015 23:12
Shell commands to replace content of multiple files
lookupdir=src
filetype=*.java
#filetype=*.{html,php,htm}
find=some_email_ids1
replace=some_email_ids2
echo "Files to be Replaced"
grep -irl "$find" "$lookupdir" --include=$filetype
grep -irl "$find" "$lookupdir" --include=$filetype | xargs sed -i "s/$find/$replace/g"
@sandeepmukho
sandeepmukho / ant.properties
Last active December 12, 2015 05:58
ANT build file that'll copy all the contents of UI folder as is to the destination folder called output (output folder should be created from scratch each time ant build script is run and output folder will be created even if it doesn't exist). All JS and CSS files inside static folder (css and js directories and their sub-directories) needs to …
ui = ui
css = static/css
js = static/js
output = output
product.name = sample
yui = yuicompressor-2.4.8.jar