Thursday, October 29, 2009

if else in awk

awk 'BEGIN{print max=0}{ if ( 10 > 12 ) print "h"; else print k;} {print $1}' dummy.dum

Tuesday, October 20, 2009

jQuery UI

jQuery UI provides a comprehensive set of core interaction plugins, UI widgets and visual effects that use a jQuery-style, event-driven architecture and a focus on web standards, accessiblity, flexible styling, and user-friendly design. All plugins are tested for compatibility in IE 6.0+, FF 2+, Safari 3.1+, Opera 9.0+, and Google Chrome.


DEmos

Thursday, October 1, 2009

ssh grep string using spaces causing problems

while running the following command using automated ssh i faced the following issue

ssh pmg-message1 grep -C50 "Oct 1 00:00:00 127.0.0.1 \(--- \) time taken=3ms, 20013, TEXT, MT" /app/pmg/archived_logs/pmg.log.2.gz


grep: 1: No such file or directory
grep: 00:00:00: No such file or directory
grep: 127.0.0.1: No such file or directory
grep: (---: No such file or directory
grep: ): No such file or directory

This string which i am trying to search is special for two reasons
1) the search string contains special characters ( and ), therefore i used escape sequence.
2) if this query was being run without ssh it is fine but for ss we need to add extra enclosing symbols ' '.as below


ssh pmg-message1 'grep -C50 "Oct 1 00:00:00 127.0.0.1 \(--- \) time taken=3ms, 20013, TEXT, MT" /app/pmg/archived_logs/pmg.log.2.gz'