Skip to content

Instantly share code, notes, and snippets.

View anaray's full-sized avatar

anumodh anaray

View GitHub Profile
@anaray
anaray / multi_jar_cp
Last active February 25, 2016 23:04
simple way to include all the jars in classpath - bash
java -cp .:$(echo /opt/hadoop/lib/*.jar | tr ' ' ':'):$(echo /opt/hbase/lib/*.jar | tr ' ' ':') ArticleIndex
ps -ef | grep <process_identifier> | grep -v grep | awk '{print $2}' | xargs kill
@anaray
anaray / remove_newlines.sh
Created June 8, 2015 10:48
remove new line from files inside a directory
#here file is renamed to <file>_edited, change as per requirement
for file in <file_base_location>/*
do
echo $file
sed '/^$/d' $file > ${file}_edited
#rm -f $file
done