Without correct permissions for files created by CGI scripts, a script will fail. So, how to set permissions automatically (on the fly) when generating CGI files with new or unique names?
By the way, the cgi code is compiled/binary, so no mod_perl, etc.
Based on this code...
BEGIN {
str = "2+2"
split(str,arr,"")
print arr[1] arr[2] arr[3]
}
...how can one simply convert the string arr[2] to the + math operator so as to print 4?
Annihilannic,
The systems are freeBSD w/sendmail and openSuse w/postfix.
However, given the new service of connection = "/inet/tcp/0/"smtp"/25", is the local mta relevant?
A successful local test makes it all the more puzzling since the same parameters work via command line/telnet to the...
A print statement was added to view server info. The "print "HELO ..." statement yields the server's 1st msg: "220 mail.server.com ESMTP" ... then the script hangs w/out any further output (even with the above code suggestions).
Maybe fflush() or close() is in order... but how to do w/out...
Here's a quiz...
How to use smtp with gawk. What works on the bash command line is not working in an awk script. Consider the following code:
BEGIN {
RS = ORS = "\r\n"
to = "name@server.com"
from = "name2@server.com"
text = "testing1...testing2...testing3..."
subject = "testing...
PHV, your suggestion is closest to my ideal. Given that parentheses around a command starts a subshell, maybe one ought to include ";exit" near the end.
Edcrosbys, after the first line in the script it is just a typical gawk script with: BEGIN { ...
Mike042 and Annihilannic, you raise...
The first line is #!/usr/bin/gawk -f, which works fine executing within the current directory. Hope to execute files that are in either a subdirectory or outside the current directory (which may require the full path from / ).
Thanks Annihilannic,
With: /another/directory/script, returned is: bash: /another/directory/script: No such file or directory
With: ./another/directory/script, the terminal hangs.
While the following seems to work:
cmd="cd another/directory; ./script; cd .."
eval $cmd
unset cmd
... it seems...
Previously, the individual scripts called the meter script directly, an incremented counter sent as an argument for generating the percent of total complete. As that became cumbersome, a single call to the meter became the goal. If/when accomplished, marking intervals using strftime() between...
I've got a gawk script that controls other gawk scripts, one of which displays overall progress on the command line. While a progress display is simple to implement given iterations within a given script, I wish to monitor the progress of the controlling script via process id and to add an...
PHV,
Your solutions are right on! So, can you recommend a favorite awk book? I have Effective Awk by Robbins. It would be nice to find more for accommodating user defined function libraries... maybe for a coming version of gawk?
Challenge: to convert what works on the command line into an executable script, putting each string within a file into an array, the file delimeter being empty space of any length.
This works on the command line:
gawk '/searchstring/ {split($0, arr, " "); for (i = 1; i <= NF; i++) { if...
Perhaps awk is not the best language for a long bash/sql interaction like that in quotes here:
command = "sqlite3 filename.sql <<SQL_ENTRY
... several lines of SQL ...
SQL_ENTRY"
Any ideas on how to make a command of many lines appear as one string (or how to better...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.