Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Problem: Need to check if a string argument contains "-" Post 302207166 by nehagupta2008 on Thursday 19th of June 2008 09:28:53 AM
Old 06-19-2008
Quote:
Originally Posted by zaxxon
Have a look at the getopts command. There should be plenty examples on the net.
Thanks for the response.
Can you please demonstrate for the above requirement? A request!
Please make a not that "-" may appear anywhere in the string.
We need to find if it contains "-"
Thanks.
 

10 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

A question/problem about oracle "tns listener" and "enterprise manager"

hi, I have * an IBM P550 machine, * an AIX 5.3 running on it and * an oracle database, already installed on it. The problem (or question of my own) is: Oracle tns listener, "CT_LISTENER", and the enterprise manager (EM) of the instance, which is uniq instance and called... (0 Replies)
Discussion started by: talipk
0 Replies

2. UNIX for Advanced & Expert Users

A question/problem about oracle "tns listener" and "enterprise manager"

hi, I have a problem about the Oracle related components. I'm not able to find any answer yet, and waiting for your responses... Here is the configuration of my system: * an IBM P550 machine, * an AIX 5.3 running on it and * an oracle database, already installed on it. The problem (or... (1 Reply)
Discussion started by: talipk
1 Replies

3. Shell Programming and Scripting

input string="3MMTQSZ348GGMZRQWMJM4SD6M";output string="3MMTQ-SZ348-GGMZR-QWMJM-4SD6

input string="3MMTQSZ348GGMZRQWMJM4SD6M" output string="3MMTQ-SZ348-GGMZR-QWMJM-4SD6M" using linux shell script (4 Replies)
Discussion started by: pankajd
4 Replies

4. Shell Programming and Scripting

How can I use if statement to check a string start with "abc"

I am trying to write a if statement in KSH that if a string is start with abc then print something, I have written some code as below but it doesn't work. Could someone please help me if ] then print success fi (5 Replies)
Discussion started by: yhever
5 Replies

5. Solaris

How to check "faulty" or "stalled" print queues - SAP systems?

Hi all, First off, sorry for a long post but I think I have no other option if I need to explain properly what I need help for. I need some advise on how best to check for "faulty" or "stalled/jammed' print queues. At the moment, I have three (3) application servers which also acts as print... (0 Replies)
Discussion started by: newbie_01
0 Replies

6. Shell Programming and Scripting

how to use "cut" or "awk" or "sed" to remove a string

logs: "/home/abc/public_html/index.php" "/home/abc/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" how to use "cut" or "awk" or "sed" to get the following result: abc abc xyz xyz xyz (8 Replies)
Discussion started by: timmywong
8 Replies

7. Shell Programming and Scripting

Need HELP with AWK split. Need to check for "special characters" in string before splitting the file

Hi Experts. I'm stuck with the below AWK code where i'm trying to move the records containing any special characters in the last field to a bad file. awk -F, '{if ($NF ~ /^|^/) print >"goodfile";else print >"badfile"}' filename sample data 1,abc,def,1234,A * 2,bed,dec,342,* A ... (6 Replies)
Discussion started by: shell_boy23
6 Replies

8. Shell Programming and Scripting

grep with "[" and "]" and "dot" within the search string

Hello. Following recommendations for one of my threads, this is working perfectly : #!/bin/bash CNT=$( grep -c -e "some text 1" -e "some text 2" -e "some text 3" "/tmp/log_file.txt" ) Now I need a grep success for some thing like : #!/bin/bash CNT=$( grep -c -e "some text_1... (4 Replies)
Discussion started by: jcdole
4 Replies

9. Shell Programming and Scripting

Delete all log files older than 10 day and whose first string of the first line is "MSH" or "<?xml"

Dear Ladies & Gents, I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out: for filename in $(find /var/log/test... (2 Replies)
Discussion started by: Hiroshi
2 Replies

10. Programming

Python : Problem with " TypeError: float() argument must be a string or a number "

Hello ! I'm creating a CGI which allow to display graph from some data. The datas looks like : 2020-01-13-00-00,384.00,350.00 2020-01-13-06-00,384.00,350.00 2020-01-13-12-00,384.00,350.00 2020-01-13-18-00,384.00,350.00 2020-01-14-00-00,384.00,350.00... (1 Reply)
Discussion started by: Tim2424
1 Replies
IMAP_APPEND(3)								 1							    IMAP_APPEND(3)

imap_append - Append a string message to a specified mailbox

SYNOPSIS
bool imap_append NULL NULL (resource $imap_stream, string $mailbox, string $message, [string $options], [string $internal_date]) DESCRIPTION
Appends a string $message to the specified $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 $message - The message to be append, as a string When talking to the Cyrus IMAP server, you must use " " as your end-of-line terminator instead of " " or the operation will fail o $options - If provided, the $options will also be written to the $mailbox o $internal_date - If this parameter is set, it will set the INTERNALDATE on the appended message. The parameter should be a date string that con- forms to the rfc2060 specifications for a date_time value. RETURN VALUES
Returns TRUE on success or FALSE on failure. CHANGELOG
+--------+---------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------+ | 5.3.2 | | | | | | | Added INTERNALDATE support to imap_append. | | | | +--------+---------------------------------------------+ EXAMPLES
Example #1 imap_append(3) example <?php $stream = imap_open("{imap.example.org}INBOX.Drafts", "username", "password"); $check = imap_check($stream); echo "Msg Count before append: ". $check->Nmsgs . " "; imap_append($stream, "{imap.example.org}INBOX.Drafts" , "From: me@example.com " . "To: you@example.com " . "Subject: test " . " " . "this is a test message, please ignore " ); $check = imap_check($stream); echo "Msg Count after append : ". $check->Nmsgs . " "; imap_close($stream); ?> PHP Documentation Group IMAP_APPEND(3)
All times are GMT -4. The time now is 01:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy