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.

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! :-)
-- 
:
####[ GNU/Linux One Stanza Tip (LOST) ]#######################

Sub : awk tips [#26]                                 LOST #486

# Prints the length of the longest line in `my_data_file'. 
# Input processed through "expand" to change tabs to spaces.
expand my_data_file | awk '{ if (x < length()) x = length()} \
                    END { print "maximum line length is " x }'
       
####[banduji (at) symonds.net]################################
:
-- 
http://mm.glug-bom.org/mailman/listinfo/linuxers

Reply via email to