06-21-2006
Hi Blowtorch,
Works out of the box !
Thank you so so much.
Cheers,
FMA
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
My server has only has access logs turned on. How do I turn on the other standard logs (i.e. I'd like to see the referring urls).
Thanks in advance. (3 Replies)
Discussion started by: pingdom
3 Replies
2. UNIX for Dummies Questions & Answers
I support an app that outputs alert and audit messages to one log file (vendor says they can't be separated). The script that I have written takes a copy (mv cmd) of the file to do the separation and reformatting. I have a problem that I loose records (messages are being written constantly, upto 3+... (5 Replies)
Discussion started by: nhatch
5 Replies
3. UNIX for Dummies Questions & Answers
How could you put the output of two commands into one file using a single command? For example put the output of a grep command and a sort command into one file together.
Here is another rough explanation of what I am trying to do;
output of
$ grep pattern file1
plus output of
$ sort file... (8 Replies)
Discussion started by: enuenu
8 Replies
4. Shell Programming and Scripting
How i can combine output of two commands in one file.......i tried this but it is not working although each command is working good seperately.....
head -1 filename | tail -1 filename
i think there is problem with command concatenator? (16 Replies)
Discussion started by: 33junaid
16 Replies
5. Solaris
I'm looking for a CLI utility that will capture all the commands you type at the Solaris CLI (and their output) into a file. I'm sure it's called "scripter", but I can't find anything on a command called scripter.
Does anyone know of a such a command?
Your help will be greatly... (3 Replies)
Discussion started by: soliberus
3 Replies
6. Shell Programming and Scripting
Hi,
I have a lot of logfiles like fooYYYYMM.log (foo200301.log, foo200810.log) with lines like
YYYY-MM-DD TIMESTAMP,text1,text2,text3...
but I need (for postprocessing) the form fooYYYYMMDD.log (so foo200402.log becomes foo20040201.log, foo20040202.log...)
with unmodified content of lines.
... (1 Reply)
Discussion started by: clzupp
1 Replies
7. Shell Programming and Scripting
Hi All,
I have a peculiar problem. I will call a script from another script.
Script abc.ksh is called by ABC.ksh as
ABC.ksh abc.ksh
in abc.ksh I will create and redirect all the statements to log file.
ABC.ksh will also has a log file. I want all the logs generated in file abc in ABC... (5 Replies)
Discussion started by: javeed7
5 Replies
8. UNIX for Dummies Questions & Answers
Hi,
1.some_command > logfile1 2>&1 will redirect everything to the file logfile1 without displaying the output of the command on the screen.
2.some_command | tee logfile1 | tee logfile2will redirect the output to logfile1 and logfile2, as well as display the output of the command on the... (1 Reply)
Discussion started by: akhila
1 Replies
9. Shell Programming and Scripting
Hello folks,
I would like ask for a help in one script I'm currently working on.
Main goal is to compare size of file available on remote site and file already downloaded (check if downloaded file is complete and non corrupted).
# Check if files were downloaded correctly
for FILES in... (6 Replies)
Discussion started by: brusell
6 Replies
10. Shell Programming and Scripting
I am trying to run 2 sets of commands but want their output in a particular format.
The 2 commands are :
md5sum $WAR_DIR/$war
and
java -jar $WAR_DIR/$war | grep build.release.version | awk '{print $3}'
The first command gives an output of
5f5261a33b92a36f80218cf14e8271ad ... (4 Replies)
Discussion started by: Junaid Subhani
4 Replies
STRSTR(3) 1 STRSTR(3)
strstr - Find the first occurrence of a string
SYNOPSIS
string strstr (string $haystack, mixed $needle, [bool $before_needle = false])
DESCRIPTION
Returns part of $haystack string starting from and including the first occurrence of $needle to the end of $haystack.
Note
This function is case-sensitive. For case-insensitive searches, use stristr(3).
Note
If you only want to determine if a particular $needle occurs within $haystack, use the faster and less memory intensive function
strpos(3) instead.
PARAMETERS
o $haystack
- The input string.
o $needle
- If $needle is not a string, it is converted to an integer and applied as the ordinal value of a character.
o $before_needle
- If TRUE, strstr(3) returns the part of the $haystack before the first occurrence of the $needle (excluding the needle).
RETURN VALUES
Returns the portion of string, or FALSE if $needle is not found.
CHANGELOG
+--------+-----------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+-----------------------------------------------+
| 5.3.0 | |
| | |
| | Added the optional parameter $before_needle. |
| | |
| 4.3.0 | |
| | |
| | strstr(3) was made binary safe. |
| | |
+--------+-----------------------------------------------+
EXAMPLES
Example #1
strstr(3) example
<?php
$email = 'name@example.com';
$domain = strstr($email, '@');
echo $domain; // prints @example.com
$user = strstr($email, '@', true); // As of PHP 5.3.0
echo $user; // prints name
?>
SEE ALSO
stristr(3), strrchr(3), strpos(3), strpbrk(3), preg_match(3).
PHP Documentation Group STRSTR(3)