On Wednesday 30 March 2011 02:02 AM, Kumar Appaiah wrote:
On Tue, Mar 29, 2011 at 11:50:07PM +0530, Rony wrote:
Thanks Kumar.
After I copied your script in byState it works. The difference was with some spaces. It looks like the site's scripts are not formatted and printed properly and they don't give any instructions on the extra steps. Becomes difficult for learners as more time is spent correcting their lapses.
I must say that the formatting on the website is pretty bad. You might want to grab the files from here, though:
http://docstore.mik.ua/orelly/unix/sedawk/examples/index.htm
They look sane to me, but, again, some tweaking may be needed for your side.
That link was very nice. They have given the scripts in the correct format. In the other pages they have made multiple lines into one long line and created confusion.
All the best!
Kumar
P. S. sed and awk are life-changers, and the time you spend on mastering them is well worth the effort! :-)
Thanks for the tips.