this is quiet simple but you are going to run into problems with people using same or similar names if you do not put in enough checks ... funky sample below will create NTID "thereh" twice ...
shell script to send email with usage of space in the directory as description :
Please any one help me in writing a script to send email with usage of space in the directory as description . (3 Replies)
Hi All,
My requirement is like this.
I want to generate records of 1 million lines. If I say lines it means one line will contain some string or numbers like
AA,3,4,45,+223424234,Tets,Ghdj,+33434,345453434,........................ upto length lets say 41. ( 41 comma sepearted aplha numneric... (2 Replies)
Hi,
I am trying to send an email to multiple IDs from Unix script. I have given the EmailIds in a file and trying to use the file as input in the script.
> cat Email
EmailID = "abc@xyz.com cbz@xyz.com"
In my script I have
. /Email
mailx -s "subj" $EmailID
This fails with the... (3 Replies)
Hi,
Is there an shell script/batch file to genarate random passwords which expires after a stipulated time period? Please suggest a software which does this for AIX and windows both else.
Thanks. (5 Replies)
Hi ,
I am new to shell scripting. i have a requirement say i will receive a file in a directory say /xyz.if that file stays in that directory more than 30 min i need to get a mail to my outlook.this should run for every 20 min in crontab.
can anyone help me? (8 Replies)
hi,
I want to send mail to DL...
i am sending email to single id using mailx .. how to send to group of ids? :confused:
i am using a file which conatins all the ids,
is there any other way to send mail without creating the DLfile?
DL=path\file.txt
mailx -s "Info BG is now... (4 Replies)
I have a script which generates recursively some files in folders for a given root folder.
I have checks for permissions and it works for all folders except one(i have 777 permission on it). When i try calling the script in problematic folder(problematic folder being root folder), script works as... (2 Replies)
Hi,
I am writing a script as follows:
#!/bin/sh
set -x
for i in `cat a`; do
#sleep 3
print $i >> server.txt
sleep 5
if test -d `vtask $i "' ls -lrt /opt/log/ '" ` ;
then
print $i >> 12.5.txt
else
print $i >> 12.0.txt
fi
done (7 Replies)
I would like to extract only the email ids from the gecos of each user id. I have to get the email ids of all the users on the server like this.
Can someone please assist me with the command/script? (15 Replies)
Hi All,
I have the below code(.sh) and need to send an email.
#!/bin/bash
cp /u02/xxc_incoming/TEST*.dat /u02/xxc_archive_incoming/AMER7764_ARPP_2/
cat /u02/xxc_incoming/TEST*.dat > /u02/xxc_incoming/XXC_TEST.dat
rm /u02/xxc_incoming/TEST*.dat
cd $XXC_TOP/bin
sqlldr userid=apps/<pwd> ... (12 Replies)
Discussion started by: Mist123
12 Replies
LEARN ABOUT PHP
stristr
STRISTR(3) 1 STRISTR(3)stristr - Case-insensitivestrstr(3)SYNOPSIS
string stristr (string $haystack, mixed $needle, [bool $before_needle = false])
DESCRIPTION
Returns all of $haystack starting from and including the first occurrence of $needle to the end.
PARAMETERS
o $haystack
- The string to search in
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, stristr(3) returns the part of the $haystack before the first occurrence of the $needle (excluding needle).
$needle and $haystack are examined in a case-insensitive manner.
RETURN VALUES
Returns the matched substring. If $needle is not found, returns FALSE.
CHANGELOG
+--------+-----------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+-----------------------------------------------+
| 5.3.0 | |
| | |
| | Added the optional parameter $before_needle. |
| | |
| 4.3.0 | |
| | |
| | stristr(3) was made binary safe. |
| | |
+--------+-----------------------------------------------+
EXAMPLES
Example #1
stristr(3) example
<?php
$email = 'USER@EXAMPLE.com';
echo stristr($email, 'e'); // outputs ER@EXAMPLE.com
echo stristr($email, 'e', true); // As of PHP 5.3.0, outputs US
?>
Example #2
Testing if a string is found or not
<?php
$string = 'Hello World!';
if(stristr($string, 'earth') === FALSE) {
echo '"earth" not found in string';
}
// outputs: "earth" not found in string
?>
Example #3
Using a non "string" needle
<?php
$string = 'APPLE';
echo stristr($string, 97); // 97 = lowercase a
// outputs: APPLE
?>
NOTES
Note
This function is binary-safe.
SEE ALSO strstr(3), strrchr(3), stripos(3), strpbrk(3), preg_match(3).
PHP Documentation Group STRISTR(3)