#!/bin/bash
while read line
do
for word in $line
do
if [[ "$word" =~ ^ABC_ ]] || [[ "$word" =~ ^ADF_ ]]
then
[ -z "$str" ] && str="$word" || str="${str},${word}"
fi
done
done < ABC.txt
echo "$str"
Sir,
I want to check for the repation of a user address in a file i used || as my delimiter and want to check repetaip0n of the address that is mailid and then i have to use IMAP and all.
How can i do this...
I am in linux ...and my file is linux file.
... (5 Replies)
Couldn't find much help on the kind of question I've here:
There is this text file with text as:
Line one has a bingo
Line two does not have a bingo but it has a tango
Bingo is on line three
Line four has both tango and bingo
Now I would want to search for the pattern "bingo" in this file... (3 Replies)
Hi all,
I would like to print words in a file seperated by whitespaces containing a specific pattern like "="
e.g. I have a file1 containing strings like
%cat file1
The= some= in
wish= born
<eof> .I want to display only those words containing = i.e The= , some=,wish=
... (5 Replies)
Hi Guys,
While I was writing one shell script , I just got struck at this point.
I need to extract words from a file at some specified position and do some comparison operation and need to replace the extracted word with another word.
Eg : I like Orange very much.
I need to replace... (19 Replies)
Hi there, Unix Gurus
Working with big listings of english sentences for my pupils, of the type:
1. If the boss's son had been , someone would have asked for money by now.
2. Look, I haven't a crime, so why can't you let me go?
....
I wondered how to extract the words between brackets in... (7 Replies)
i need to extract the string between two tags,
input file is
<PersonInfoShipTo AddressID="446311709" AddressLine1="" AddressLine2="" AddressLine3="" AddressLine4="" AddressLine5="" AddressLine6="" AlternateEmailID="" Beeper="" City="" Company="" Country="" DayFaxNo="" DayPhone="" Department=""... (5 Replies)
Hi
This is my first post and I'm just a beginner. So please be nice to me.
I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file?
I have tried sed -n 241,241p... (13 Replies)
hi I made this simple script to extract data and pretty much is a list and would like to extract data of two words separated by commas and I would like to make a new text file that would list these extracted data into a list and each in a new line.
Example that worked for me with text file... (5 Replies)
I have a file with a list of references towards the end and want to apply a grep for some string.
text ....
@unnumbered References
@sp 1
@paragraphindent 0
2017. @strong{Chalenski, D.A.}; Wang, K.; Tatanova, Maria; Lopez,
Jorge L.; Hatchell, P.; Dutta, P.; @strong{Small airgun... (1 Reply)
Discussion started by: kristinu
1 Replies
LEARN ABOUT PHP
mb_encode_mimeheader
MB_ENCODE_MIMEHEADER(3) 1 MB_ENCODE_MIMEHEADER(3)mb_encode_mimeheader - Encode string for MIME headerSYNOPSIS
string m0],n[int_m$indent]) (string $str, [string $charset = mb_internal_encoding()], [string $transfer_encoding = "B"], [string $line-
feed = "
DESCRIPTION
Encodes a given string$str by the MIME header encoding scheme.
PARAMETERS
o $str
- The string being encoded.
o $charset
-$charset specifies the name of the character set in which $str is represented in. The default value is determined by the current
NLS setting ( mbstring.language). mb_internal_encoding(3) should be set to same encoding.
o $transfer_encoding
-$transfer_encoding specifies the scheme of MIME encoding. It should be either "B" (Base64) or "Q" (Quoted-Printable). Falls back
to "B" if not given.
o $linefeed
-$linefeed specifies the EOL (end-of-line) marker with which mb_encode_mimeheader(3) performs line-folding (a RFC term, the act of
breaking a line longer than a certain length into multiple lines. The length is currently hard-coded to 74 characters). Falls back
to "
" (CRLF) if not given.
o $indent
- Indentation of the first line (number of characters in the header before $str).
RETURN VALUES
A converted version of the string represented in ASCII.
EXAMPLES
Example #1
mb_encode_mimeheader(3) example
<?php
$name = ""; // kanji
$mbox = "kru";
$doma = "gtinn.mon";
$addr = mb_encode_mimeheader($name, "UTF-7", "Q") . " <" . $mbox . "@" . $doma . ">";
echo $addr;
?>
NOTES
Note
This function isn't designed to break lines at higher-level contextual break points (word boundaries, etc.). This behaviour may
clutter up the original string with unexpected spaces.
SEE ALSO mb_decode_mimeheader(3).
PHP Documentation Group MB_ENCODE_MIMEHEADER(3)