On 7 Sep 2006 at 5:14, schpanich wrote:
> Hello friends,
> My name is Srinivas Chakrpani, I have so many doubts in awk scripting.
> The scripting tools like perl,php,python can call from a web browser.
> Just by modification the Add-Handler types in httpd.conf file (for
> apache web server). Is it possible in the same way we can call any
> awkscript from the webserver. If so please give the details what we
> have to do to the file/ permissions to files and with a example script.
the awk file has to be executable
in httpd.conf :
<IfModule mod_mime.c>
...
AddHandler cgi-script awk
...
</IfModule>
The file index.awk
starts with
#!/bin/gawk -f
> Moreover I want to format the numbers in awk that is
> 123456 as 1,23,456 how is it possible if possible please share me with
> a example
echo 123456 | gawk '{print gensub(/(.)(..)(...)/,"\\1,\\2,\\3",1)}'
1,23,456
> I want access multiple files in awk is it possible?
while((getline < "file1") > 0) {
...
}
close("file1")
while((getline < "file2") > 0) {
...
}
close("file2")
> Any scripts in awk are please send to my mail address giving below
Daniel