Hi All,
I have 2 programs running by the following names:
a_testloop.sh
testloop.sh
I read these programs names from a file and store each of them into a variable called $program.
On the completion of the above programs i should send an email.
When i use grep with ps to see if any of... (3 Replies)
hi!
i'm trying to get grep to do an exact match for the following pattern but..it's not quite working. I'm not too sure where did I get it wrong. any input is appreciated.
echo "$VAR" | grep -q '^test:]name'
if ; then
printf "test name is not found \n"
fi
on... (4 Replies)
Hi there,
I've search this forum and find this problem could have been solved by,
grep -ho "num=*" input_data
The input_data is,
1\11\num1=100\num2=200\newnum1=220\\@
however, what I have got is ,
num1=100
num1=220
how to get the exact string, (4 Replies)
QUESTION1:
How do you grep only an exact string. I am using Solaris10 and do not have any GNU products installed.
Contents of car.txt
CAR1_KEY0
CAR1_KEY1
CAR2_KEY0
CAR2_KEY1
CAR1_KEY10
CURRENT COMMAND LINE: WHERE VARIABLE CAR_NUMBER=1 AND KEY_NUMBER=1
grep... (1 Reply)
Hi All,
I have a text / log file which contains strings like meta777, 77, meta, 777. Now I want to write a script which can detect a string 'meta#777' in a text file & number of occurence of 'meta', number of #, number 7, 77, 777.
I'm using grep -e '77' filename but no luck. It is returning... (5 Replies)
I am attempting to grep an exact string from a series of files within a directory and append that output to the filename when it is present in the file. I've been after this all day with no luck. Thanks for your help in advance :wall:. (4 Replies)
Hi ,
am getting output file, it sontains the below values.
./hawk_DOM1_FIRST_ENV
./hawk_DOM2_SECOND_ENV
./hawk_DOM3_THIRD_ENV
Now I need to grep the word "DOM1_FIRST_ENV","DOM2_SECOND_ENV"
like that.
I tired with cut -d "_". Its not working with any deleimiter.
Can you please help to... (3 Replies)
As the title says I'm running a korn script in attempts to find an exact match in named.conf
finddomain.ksh
#!/bin/ksh
#
echo "********** named.conf ************"
file=/var/named/named.conf
for domain in `cat $1`
do
grep -n '"\$domain "' $file
done
echo "********** thezah.inc... (1 Reply)
Hi all,
I tried searching the forum for this, and I read numerous suggestions here and even on other forums, and I cannot get this to want the way that I need it to. I tried grep -W / -f to no luck. Here is what I have. I have a list of file names-
FILE1-FILE1TEST,FILE1RELATION... (7 Replies)
I am currently having some issues while trying to grep for a exact string inside a file. I have tried doing this from command line and things work fine i.e. when no match is found, return code=1 but when its done as part of my script it returns 0 for the same command - I dont know if there is an... (6 Replies)
Discussion started by: Ads89
6 Replies
LEARN ABOUT PHP
timezone_name_from_abbr
TIMEZONE_NAME_FROM_ABBR(3) 1 TIMEZONE_NAME_FROM_ABBR(3)timezone_name_from_abbr - Returns the timezone name from abbreviationSYNOPSIS
string timezone_name_from_abbr (string $abbr, [int $gmtOffset = -1], [int $isdst = -1])
DESCRIPTION PARAMETERS
o $abbr
- Time zone abbreviation.
o $gmtOffset
- Offset from GMT in seconds. Defaults to -1 which means that first found time zone corresponding to $abbr is returned. Otherwise
exact offset is searched and only if not found then the first time zone with any offset is returned.
o $isdst
- Daylight saving time indicator. Defaults to -1, which means that whether the time zone has daylight saving or not is not taken
into consideration when searching. If this is set to 1, then the $gmtOffset is assumed to be an offset with daylight saving in
effect; if 0, then $gmtOffset is assumed to be an offset without daylight saving in effect. If $abbr doesn't exist then the time
zone is searched solely by the $gmtOffset and $isdst.
RETURN VALUES
Returns time zone name on success or FALSE on failure.
EXAMPLES
Example #1
A timezone_name_from_abbr(3) example
<?php
echo timezone_name_from_abbr("CET") . "
";
echo timezone_name_from_abbr("", 3600, 0) . "
";
?>
The above example will output something similar to:
Europe/Berlin
Europe/Paris
SEE ALSO timezone_abbreviations_list(3).
PHP Documentation Group TIMEZONE_NAME_FROM_ABBR(3)