Re: help please Exercise 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 26, 2004 at 05:52:56PM -0700, Mr. Oberoi wrote:

> can some one tell me what is wrong with the following
> filter...
> =================================================== 
> [oberoi@localhost uni]$ ./squidlogconverter.sh access
> -n
....
> numbering file...
> awk: cmd. line:1: %9d.%03d %d %d.%d.%d.%d %s/%03d %d
> %s %s %s %s%s/%s %s /n { print $3 "," $4}
> awk: cmd. line:1: ^ syntax error

Look at the man and info page for gawk.

     # info gawk

A formatted gawk/awk command  might look more like:

  printf "%4.3e\n", 1950

Compare and contrast print and printf.....

Curious... this is suposed to be a bash script and you are using
awk.  
      Is awk necessary?

What is the very first line of the script?

N.B. shell scripts commonly use binutils to get real work done
and that includes awk.   However today lots of nifty stuff is 
built in.
    for i in 1 2; do a=1; for j in 1 2 3 4 5 6 7 8 9 0; do echo " $a,"; let a++ ; done; done

-- 
	T o m  M i t c h e l l 
	Just say no to 74LS73 in 2004



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux