I have to compare records in two files. It can be done using gawk/awk but i am unable to do it. Please help me
File1
ABAAAAAB BC asa sa
ABAAABAA BC bsa sm
ABBBBAAA BC bxz sa
ABAAABAB BC csa sa
ABAAAAAA BC dsa sm
ABBBBAAB BC dxz sa
File 2
ABAAAAAB BC aas ba
ABAAAAAB BC asa sa... (6 Replies)
I know, and I apologise for using the W word, but I have users asking if they can use my gawk scripts, but I just know they're not going to like using the DOS command line.
Is there any way for me to run my gawk scripts from a gui? Even if it's from a web page (html, php, what ever). I do not... (3 Replies)
Hi,
I am using the script to print the portion of the file containing a particular string. But it is giving error "For Reading (No such file or directory). I am using cygwin as unix simulator.
cat TT35*.log | gawk -v search="12345678" '
/mSOriginating /,/disconnectingParty/ {
... (1 Reply)
Good morning all. I have been running into a problem running a simple gawk script that selects every third line from an input file and writes it to an output file.
gawk "NR%3==0" FileIn > FileOut
I am attempting to run this command from a batch file at the command line. I have several hundred... (6 Replies)
Hi..
i have two files::
file_1::
mOnkey
huMAnfile_2::
Human:hates:banana
i:like:***
Monkey:loves:banana
dogs:kill:catsdesired output::
Monkey:loves:banana
Human:hates:bananaso only when the 1st field matches from both files print it from file_2 ((case-sensitive))
i also would like... (21 Replies)
Discussion started by: M@LIK
21 Replies
LEARN ABOUT PHP
http_redirect
HTTP_REDIRECT(3) 1 HTTP_REDIRECT(3)http_redirect - Issue HTTP redirectSYNOPSIS
bool http_redirect ([string $url], [array $params], [bool $session = false], [int $status])
DESCRIPTION
Redirect to the given url.
The supplied $url will be expanded with http_build_url(3), the $params array will be treated with http_build_str(3) and the session iden-
tification will be appended if $session is true. The HTTP response code will be set according to $status. You can use one of the redirect
constants for convenience. Please see RFC 2616 for which redirect response code to use in which situation. By default PHP will decide which
response status fits best.
To be RFC compliant, "Redirecting to <a>URL</a>." will be displayed, if the client doesn't redirect immediately, and the request method
was another one than HEAD.
A log entry will be written to the redirect log, if the INI settinghttp.log.redirect is set and the redirect attempt was successful.
PARAMETERS
o $url
- the URL to redirect to
o $params
- associative array of query parameters
o $session
- whether to append session information
o $status
- custom response status code
RETURN VALUES
Returns FALSE or exits on success with the specified redirection status code. See the INI settinghttp.force_exit for what "exits" means.
EXAMPLES
Example #1
A http_redirect(3) example
<?php
http_redirect("relpath", array("name" => "value"), true, HTTP_REDIRECT_PERM);
?>
The above example will output:
HTTP/1.1 301 Moved Permanently
X-Powered-By: PHP/5.2.2
Content-Type: text/html
Location: http://www.example.com/curdir/relpath?name=value&PHPSESSID=abc
Redirecting to <a href="http://www.example.com/curdir/relpath?name=value&PHPSESSID=abc">http://www.example.com/curdir/relpath?name=value&PHPSESSID=abc</a>.
SEE ALSO
the HttpResponse class if you are using PHP 5.1.0 and above.
PHP Documentation Group HTTP_REDIRECT(3)