Searching for a member of an arrray Bash 3.2 with a @..

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Searching for a member of an arrray Bash 3.2 with a @..
# 8  
Old 08-26-2013
This solved it.

	for((i=0;i<${#array};i++)) {
   if [[ ${array[i]} = *@* ]]
       echo "${array[i]} contains @"

Thanks Chubler_XL
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. What is on Your Mind?

New member

Hi guys! My name is Leonida and I am new here to this forum. Nice meeting you all. (1 Reply)
Discussion started by: leeoona
1 Replies

2. Shell Programming and Scripting

Bash 3.2 - Array / Regex - IF 3rd member in array ends in 5 digits then do somthing...

Trying to do some control flow parsing based on the index postion of an array member. Here is the pseudo code I am trying to write in (preferably in pure bash) where possible. I am thinking regex with do the trick, but need a little help. pesudo code if == ENDSINFIVEINTS ]]; then do... (4 Replies)
Discussion started by: briandanielz
4 Replies

3. Shell Programming and Scripting

Searching file for pattern, output to file (BASH)

Hello, I'm trying to write a script in Bash to assist in pentesting. Essentially I'm looking to use a script to search for some terms in a log file and then send that key information into another file. The log files consist of HTTP and SSL information that someone creates while browsing and... (2 Replies)
Discussion started by: Sagesparten007
2 Replies

4. Shell Programming and Scripting

searching a file with a specified text without using conventional file searching commands

without using conventional file searching commands like find etc, is it possible to locate a file if i just know that the file that i'm searching for contains a particular text like "Hello world" or something? (5 Replies)
Discussion started by: arindamlive
5 Replies

5. Shell Programming and Scripting

Searching for bash to cshell convertor

Hi ,I have seen this comverters before ,but I was searching today and I can not find them .Is anybody used them before .Any recomendations Thanks (5 Replies)
Discussion started by: lio123
5 Replies

6. UNIX for Dummies Questions & Answers

New Member

HI Bruce from Central PA I have never used Unix but am sick of Microsoft so want to learn it. I use to own a computer store front and training center and stated our with Atari, Commodore and the 1st PC and MS/DOS then Windows BUT sick of Microsoft controlling the computer industry. ... (2 Replies)
Discussion started by: Brucec
2 Replies

7. Shell Programming and Scripting

Performing fast searching operations with a bash script

Hi, Here is a tough requirement , to be served by bash script. I want to perform 3,00,000 * 10,000 searches. i.e. I have 10,000 doc files and 3,00,000 html files in the file-system. I want to check, which of the doc files are referred in any html files. (ex- <a href="abc.doc">abc</a>)... (3 Replies)
Discussion started by: jitendriya.dash
3 Replies

8. Shell Programming and Scripting

Bash script for searching a string

Hi, I have a file that contains thousands of records. Each record starts with "New Record". I need to search this file based on a given value of "timestamp" and write all the records that match this timestamp into a new file. I was able to locate the existence of a given value of timestamp using... (10 Replies)
Discussion started by: shoponek
10 Replies

9. Shell Programming and Scripting

Searching Bash Arrays

Hi, I am writing a bash shell script. I would like to execute a statement only if an array contains a specific value. For example: array=(1 3 5 7) I would like to execute the statement only if the value 3 is present in ${array}. Thanks for any help, Mike (1 Reply)
Discussion started by: msb65
1 Replies

10. UNIX for Dummies Questions & Answers

new member need help

brothers and sisters iam a new member of your respectful forum hope to accept me i really would like to an expert in unix and linux so please tell me how could ? and what i should have ? i want to make my project in these subject but i dont know what to do and which... (12 Replies)
Discussion started by: yemen
12 Replies
Login or Register to Ask a Question
FBB::mlm(3bobcat)					      OFoldStream manipulator						 FBB::mlm(3bobcat)

FBB::mlm - Manipulator modifying left margins of OFoldStream objects SYNOPSIS
#include <bobcat/ofoldstream> or #include <bobcat/ofoldstreambuf> Linking option: -lbobcat DESCRIPTION
The mlm class implements a manipulator that can be inserted into OFoldStream objects to modify the stream's left margin by a requested amount. The request cannot result in a negative left margin value. If a negative left margin would be the arithmetic result of the request then left margin 0 will silently be used. Depending on the tab-setting of the OFoldStream the inserted value represents the number of blank space characters or the number of tab-characters that will be added to the left margin. The request will be processed at the next newline character or std::flush or std::endl manipulator that is inserted into the stream. If a line is still empty once an mlm object and a flush manipulator are inserted into the stream then the new left margin will be effective at the next word inserted into that line (cf., the example section below) A bad_cast exception is thrown when the manipulator is inserted into an ostream that is not using a OFoldStreambuf buffer. NAMESPACE
FBB All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB. INHERITS FROM
o mlm(int addValue): The standard copy constructor is available. MEMBER FUNCTIONS
There are no public or protected member functions in this class. EXAMPLE
#include <iostream> #include <bobcat/ofoldstream> using namespace std; using namespace FBB; int main() { OFoldStream out(cout, 0, 80); out << "hello world (left margin is 0)" << mlm(4) << " " "this uses a 4 character wide left margin " << mlm(-10) << flush << "left margin -6 changed to 0, active on this line "; return 0; } FILES
bobcat/mlm - defines the class interface SEE ALSO
bobcat(7), manipulators(3bobcat), lm(3bobcat), ofoldstream(3bobcat) BUGS
o bobcat_3.01.00-x.dsc: detached signature; o bobcat_3.01.00-x.tar.gz: source archive; o bobcat_3.01.00-x_i386.changes: change log; o libbobcat1_3.01.00-x_*.deb: debian package holding the libraries; o libbobcat1-dev_3.01.00-x_*.deb: debian package holding the libraries, headers and manual pages; o public archive location; BOBCAT
Bobcat is an acronym of `Brokken's Own Base Classes And Templates'. COPYRIGHT
This is free software, distributed under the terms of the GNU General Public License (GPL). AUTHOR
Frank B. Brokken ( libbobcat1-dev_3.01.00-x.tar.gz 2005-2012 FBB::mlm(3bobcat)