01-09-2002
Look into the tee command. ($ man tee)
That might help you out.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
is it possible to echo 'some text' every 10 minutes on my screen continues ,
without cron. (1 Reply)
Discussion started by: vkandati
1 Replies
2. UNIX for Dummies Questions & Answers
Major Newbie here folks. I'm trying to set a variable to my Home directory and then echo it to the screen.
Any and all help is greatly appreciated.
Thanks
Anna (3 Replies)
Discussion started by: amidget
3 Replies
3. Shell Programming and Scripting
Hello all!..
does anyone know the syntax to print to the screen and to a file?
Im using something like
AWK ....
print header |tee -a invalid_csv_file ;
END {..}
' invalid_csv_file="$invalid_csv_dir_file"
but no joy?
I get sh:... (2 Replies)
Discussion started by: satnamx
2 Replies
4. Shell Programming and Scripting
as the title suggests, i need to print a user message to a log file and the screen using perl.
in unix i set up a function using 'tee' like so
function Display_Message
{
echo "$*" | tee -ai $LOGFILE
}
the following command then obviously displays to the screen and prints to a log... (6 Replies)
Discussion started by: mjays
6 Replies
5. AIX
Hi all,
Could you please tell me how to take a screenshot in aix (like Print Screen button in windows)?
Thanks (7 Replies)
Discussion started by: prashantchavan
7 Replies
6. Shell Programming and Scripting
Please help me to simplify my below script.
#!/bin/bash
LOG_FILE=/tmp/log.txt
echo "Hello"
echo "Hello" >> /tmp/log.txt
Is there anyway, that I can echo "Hello" to both screen and file with one single echo command ? (6 Replies)
Discussion started by: phamp008
6 Replies
7. Shell Programming and Scripting
I have two text files, each of then only containing ONE line and NO carraige return or white space at the end...how do I echo both of these text files to the screen without putting an extra line? I want to do this from the command line.
file1.txt:
this is file1.txt 1
file2.txt:
this is... (4 Replies)
Discussion started by: ajp7701
4 Replies
8. UNIX for Dummies Questions & Answers
Hi all,
I have a script that bulk loads thousands of lines of data. I need to log the output during the execution of the script.
I know I can redirect (">") the output to a file; however, I want the output going to both the screen and the log file.
I thought I could use pipe to pipe the... (10 Replies)
Discussion started by: orahi001
10 Replies
9. Shell Programming and Scripting
Hi,
i need to execute echo command to write in a txt file on a remote machine. i did it in this way:
ssh user@remotemachine "echo "put text here" > /home/user/myfile.txt"
I tried to run the same command within a detached screen in this way:
ssh user@remotemachine screen -dm "echo "put... (3 Replies)
Discussion started by: brembo
3 Replies
10. Shell Programming and Scripting
In shellscript, I want to display echo message in console and in the log file. please help me to display this message in two places.
I am using below statment to display messsage, but it is displaying in log file only.
echo "Server Already running" >> serverlog 2>&1 (3 Replies)
Discussion started by: Kri
3 Replies
LEARN ABOUT PHP
imap_search
IMAP_SEARCH(3) 1 IMAP_SEARCH(3)
imap_search - This function returns an array of messages matching the given search criteria
SYNOPSIS
array imap_search (resource $imap_stream, string $criteria, [int $options = SE_FREE], [string $charset = NIL])
DESCRIPTION
This function performs a search on the mailbox currently opened in the given IMAP stream.
For example, to match all unanswered messages sent by Mom, you'd use: "UNANSWERED FROM mom". Searches appear to be case insensitive. This
list of criteria is from a reading of the UW c-client source code and may be incomplete or inaccurate (see also RFC2060, section 6.4.4).
PARAMETERS
o $
imap_stream -An IMAP stream returned by imap_open(3).
o $criteria
- A string, delimited by spaces, in which the following keywords are allowed. Any multi-word arguments (e.g. FROM "joey smith")
must be quoted. Results will match all $criteria entries.
o ALL - return all messages matching the rest of the criteria
o ANSWERED - match messages with the \ANSWERED flag set
o BCC "string" - match messages with "string" in the Bcc: field
o BEFORE "date" - match messages with Date: before "date"
o BODY "string" - match messages with "string" in the body of the message
o CC "string" - match messages with "string" in the Cc: field
o DELETED - match deleted messages
o FLAGGED - match messages with the \FLAGGED (sometimes referred to as Important or Urgent) flag set
o FROM "string" - match messages with "string" in the From: field
o KEYWORD "string" - match messages with "string" as a keyword
o NEW - match new messages
o OLD - match old messages
o ON "date" - match messages with Date: matching "date"
o RECENT - match messages with the \RECENT flag set
o SEEN - match messages that have been read (the \SEEN flag is set)
o SINCE "date" - match messages with Date: after "date"
o SUBJECT "string" - match messages with "string" in the Subject:
o TEXT "string" - match messages with text "string"
o TO "string" - match messages with "string" in the To:
o UNANSWERED - match messages that have not been answered
o UNDELETED - match messages that are not deleted
o UNFLAGGED - match messages that are not flagged
o UNKEYWORD "string" - match messages that do not have the keyword "string"
o UNSEEN - match messages which have not been read yet
o $options
- Valid values for $options are SE_UID, which causes the returned array to contain UIDs instead of messages sequence numbers.
o $charset
-
RETURN VALUES
Returns an array of message numbers or UIDs.
Return FALSE if it does not understand the search $criteria or no messages have been found.
EXAMPLES
Example #1
imap_search(3) example
<?php
$conn = imap_open('{imap.example.com:993/imap/ssl}INBOX', 'foo@example.com', 'pass123', OP_READONLY);
$some = imap_search($conn, 'SUBJECT "HOWTO be Awesome" SINCE "8 August 2008"', SE_UID);
$msgnos = imap_search($conn, 'ALL');
$uids = imap_search($conn, 'ALL', SE_UID);
print_r($some);
print_r($msgnos);
print_r($uids);
?>
The above example will output something similar to:
Array
(
[0] => 4
[1] => 6
[2] => 11
)
Array
(
[0] => 1
[1] => 2
[2] => 3
[3] => 4
[4] => 5
[5] => 6
)
Array
(
[0] => 1
[1] => 4
[2] => 6
[3] => 8
[4] => 11
[5] => 12
)
SEE ALSO
imap_listscan(3).
PHP Documentation Group IMAP_SEARCH(3)