I am using Korne Shell in HP-Ux. Can someone give me and idea on how I can write a shellscript on how to do this please:-
On our HP-UX server, a batch file is run every evening at about 6:30pm. The first step of this batch file will touch an empty "flag" file to indicate that the batch has... (6 Replies)
hi ,
i am trying to compre two strings
if ] or if ]
when the length of var1 is small (around 300-400 char ) it works fine
but when it is large (around 900-1000 chars) it fails
is there any limitations for this type of comparison ??? (3 Replies)
hi ,
i am trying to compre two strings
if ] or if ]
when the length of var1 is small (around 300-400 char ) it works fine
but when it is large (around 900-1000 chars) it fails
is there any limitations for this type of comparison ??? (1 Reply)
Hello,
was just wondering how to compare strings in unix? I mean as in C there is a function strcmp() in string.h, is there any function in unix for that? I tried using
if
and all such variations but didn't succeed. Any help would be appreciated. Thanks in advance :) (9 Replies)
I want to remove a line that has empty string at second field when I use cut with delimeter , like below
$cat demo
hello, mum
hello,
#!/bin/sh
while read line
do
if
then
# remove the current line command goes here
fi
done < "demo"
i got an error message for above... (4 Replies)
I have a folder a1 with the following files
sample_1.log
sample_2.log
sample_3.log
sample_4.log
sample_5.log
sample_6.log
In another folder there is a file b with the value 5
My script should take the value 5 ( file b), compare it with the files in folder a1, if file name contains... (1 Reply)
Hi,
I need help on doing the below thing in shell script.
I have a file with millions of rows called "abc.txt". i have another file with millions of rows called "xyz.txt".
I would like to do the below operation.
Open the abc.txt, read the first line, do some operations on the column... (2 Replies)
Hi,
I have written one script :
#!/bin/bash
echo -n -e "\nEnter how many files : "
read no
for (( j=1; j<=$no; j++ ))
do
echo -n -e "\nEnter $j File name : "
read name
done
for (( j=1; j<=$no; j++ ))
do
FILE=`find ./ -type f -name "${name}"`
echo "$FILE" (3 Replies)
I have a scenario to implement in Korn shell script. Here it is..
I need to compare two values to see whether they are same or not. The issue is that the values coming in for comparison can be a string or an integer which can be determined during run time only.
Which korn shell comparison... (1 Reply)
Hi,
I'm having two fields in the file
F1|F2
20111220|102000
F1 ->YYYYMMDD
F2 ->HHMMSS
Now, I need to compare this with current date & time and need to return the difference value in hours. Already, I checked with datecalc from the forum. So, need hints from Shell Gurus.
Thanks (10 Replies)
Discussion started by: buzzusa
10 Replies
LEARN ABOUT PHP
imap_status
IMAP_STATUS(3) 1 IMAP_STATUS(3)imap_status - Returns status information on a mailboxSYNOPSIS
object imap_status (resource $imap_stream, string $mailbox, int $options)
DESCRIPTION
Gets status information about the given $mailbox.
PARAMETERS
o $
imap_stream -An IMAP stream returned by imap_open(3).
o $mailbox
- The mailbox name, see imap_open(3) for more information
o $options
- Valid flags are:
o SA_MESSAGES - set $status->messages to the number of messages in the mailbox
o SA_RECENT - set $status->recent to the number of recent messages in the mailbox
o SA_UNSEEN - set $status->unseen to the number of unseen (new) messages in the mailbox
o SA_UIDNEXT - set $status->uidnext to the next uid to be used in the mailbox
o SA_UIDVALIDITY - set $status->uidvalidity to a constant that changes when uids for the mailbox may no longer be valid
o SA_ALL - set all of the above
RETURN VALUES
This function returns an object containing status information. The object has the following properties: messages, recent, unseen, uidnext,
and uidvalidity.
flags is also set, which contains a bitmask which can be checked against any of the above constants.
EXAMPLES
Example #1
imap_status(3) example
<?php
$mbox = imap_open("{imap.example.com}", "username", "password", OP_HALFOPEN)
or die("can't connect: " . imap_last_error());
$status = imap_status($mbox, "{imap.example.org}INBOX", SA_ALL);
if ($status) {
echo "Messages: " . $status->messages . "<br />
";
echo "Recent: " . $status->recent . "<br />
";
echo "Unseen: " . $status->unseen . "<br />
";
echo "UIDnext: " . $status->uidnext . "<br />
";
echo "UIDvalidity:" . $status->uidvalidity . "<br />
";
} else {
echo "imap_status failed: " . imap_last_error() . "
";
}
imap_close($mbox);
?>
PHP Documentation Group IMAP_STATUS(3)