17.7.09

Paper Presentation & Idea Submission Opportunities

There are couple of opportunities open where you can publish your work and submit your ideas:

1. 20th International Symposium on Software Reliability Engineering. Important dates for the same are
Industry Practices Submission of Abstract: July 25, 2009
Industry Practices Submission Acceptance Notification : August 15, 2009

2. The Third International Conference On Multimedia Systems Architecture And Applications. Last date for submitting paper here is 2nd August.

3. Bluetooth Innovation World Cup - Participation. The database will be open for submissions between 1 June and 31 October so keep your eyes open and take the chance to submit your idea for the first Bluetooth Innovation World Cup!

1.7.09

The Power of UNIX Shell

Try a program which require 'n' number of lines to be deleted from the file after matching particular string pattern.

General approach will be like this:
1. Find the total line number 'X' in given file
2. Find a line number 'N' which matches a given pattern.
3. copy all the lines from line#1 to line#(N-1) to the temp file
4. skip next 'n' number of lines
5. copy and append from line#(N+n) line#X to the temp file
6. rename temp file to the given file

This is little complex to implement in C/C++. It'll take around 20-30 lines of code to write in C/C++. But it is just a matter of 2 lines in UNIX. And here it is how you do it:

If you have find the all the line numbers required then
1. To copy all the lines from line#1 to line#(N-1)
head -[first N-1 lines to be copied] [given_file] > [temp_file]

2. Just calculate the line numbers to be copied from the EOF (End-of-File)
tail -[last X-N-n+1 lines to be copied] [given_file] >> [temp_file]