help please Exercise 3
Nifty Hat Mitch
mitch48 at sbcglobal.net
Fri Aug 27 04:14:39 UTC 2004
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 at 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
More information about the fedora-list
mailing list