how to parse the command line argument to look for '@' sign and the following with '.'.
In my shell script one of the argument passed is email address. I want to parse this email address to look for correct format.
rmjoe123@hotmail.com has '@' sign and followed by a '.'
to be more... (1 Reply)
Hi,
I have a requirement. I have an application which can take a file as inputs. Now the file can contain any number of lines. The tool has to pick up the first uncommented line and begin processing it.
For example the file could be like this:
#MANI123|MANI1234
#MANI234|MANI247... (4 Replies)
I have record line somthing like below with first line showing char spacing not real record line
1 | 2 | 3rd Field--------------|-4th field--| This is charcatersapcing of line
DF20000000000000000130.7890000000750
I shoudl get two line from above line
1st line should
1 | 2 | 3rd... (3 Replies)
#I'm quite new to scripting and my boss has asked me to solve a simple problem and sadly, I can't figure out how to do it. Any help is appreciated.
:confused:
#The following is a small shell script and the output that it produces for google.com.
#!/bin/sh
whois $1 | grep "Name Server"... (5 Replies)
Hey guys,
I have this file generated by me... i want to create some HTML output from it.
The problem is that i am really confused about how do I go about reading the file.
The file is in the following format:
TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Hi everybody, I have a string stored in a variable called record:
record="SNMPv2-SMI::ent.9.9.43.1.3.9.2 = Timeticks: (177330898) 20 days, 12:35:08.98"
I want to write some regular expressions good for Korn Shell to extract the number between parenthesis, in this case 177330898, and put it in... (3 Replies)
I have a xml file like this
<bul:collectionStrategy name="strategy1">
<bul:collectionTemplateGroup name="15min group"/>
<bul:collectionTemplateGroup name="hourly group"/>
</bul:collectionStrategy>
<bul:CollectionTemplateGroup name="hourly group" >
... (2 Replies)
I have a file parameters.txt which contains
151524
151525
I have another file OID.csv which contains
NE Version Object Type ID SDK param name Object OID
test1 Start: 4.2 End: 4.2 pan 151524 speed ... (5 Replies)
Well, issue is i have to parse this script to get the VERSION:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleAllowMixedLocalizations</key>
... (9 Replies)
Hi,
I need some guidance with understanding this Perl script below. I am not the author of the script and the author has not leave any documentation. I supposed it is meant to be 'easy' if you're a Perl or regex guru. I am having problem understanding what regex to use :confused: The script does... (3 Replies)
Discussion started by: newbie_01
3 Replies
LEARN ABOUT PHP
iconv_substr
ICONV_SUBSTR(3) 1 ICONV_SUBSTR(3)iconv_substr - Cut out part of a stringSYNOPSIS
string iconv_substr (string $str, int $offset, [int $length = iconv_strlen($str, $charset)], [string $charset = ini_get("iconv.inter-
nal_encoding")])
DESCRIPTION
Cuts a portion of $str specified by the $offset and $length parameters.
PARAMETERS
o $str
- The original string.
o $offset
- If $offset is non-negative, iconv_substr(3) cuts the portion out of $str beginning at $offset'th character, counting from zero.
If $offset is negative, iconv_substr(3) cuts out the portion beginning at the position, $offset characters away from the end of
$str.
o $length
- If $length is given and is positive, the return value will contain at most $length characters of the portion that begins at
$offset (depending on the length of $string). If negative $length is passed, iconv_substr(3) cuts the portion out of $str from
the $offset'th character up to the character that is $length characters away from the end of the string. In case $offset is also
negative, the start position is calculated beforehand according to the rule explained above.
o $charset
- If $charset parameter is omitted, $string are assumed to be encoded in iconv.internal_encoding. Note that $offset and $length
parameters are always deemed to represent offsets that are calculated on the basis of the character set determined by $charset,
whilst the counterpart substr(3) always takes these for byte offsets.
RETURN VALUES
Returns the portion of $str specified by the $offset and $length parameters.
If $str is shorter than $offset characters long, FALSE will be returned.
SEE ALSO substr(3), mb_substr(3), mb_strcut(3).
PHP Documentation Group ICONV_SUBSTR(3)