Sponsored Content
Full Discussion: Splitting a string with awk
Top Forums Shell Programming and Scripting Splitting a string with awk Post 302224864 by pxy2d1 on Thursday 14th of August 2008 05:41:41 AM
Old 08-14-2008
Zaxxon,
Thanks for your help.
Yes I understand the principal of splitting the string based on a given field seperator and placing each new field in an array.
My problem is that my string contains no field seperators.
From your example how would you split if the string contained no ":" and was simply aabbccddee.
I would like to assign each letter of the string to a place in the array.

Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

string splitting

Hi, I have a string like 'xyz' and i want to to split the above string into letters for comparision purpose. any idea pls. cheers RRK. (3 Replies)
Discussion started by: ravi raj kumar
3 Replies

2. Shell Programming and Scripting

Splitting a string

Hi, I am new to shell scripting, Can any body suggest me how I can split a string with a delimiter as whitespace into words and store into a array. I have read a line from file, now I want to split the line into words and store in a array for further use. eg : the sky is blue want... (3 Replies)
Discussion started by: smk
3 Replies

3. Programming

Is this string splitting function OK?

Hello, I am recently working on an application that sends large strings accross a network very often. These then need to be broken up first with '!' and then with ','. My current function (below) works fine for this when not too much data is being sent across the network but segfaults when a... (4 Replies)
Discussion started by: kpedersen
4 Replies

4. Shell Programming and Scripting

Perl - Need help on splitting string

Let's say I have a very long string with no spaces but just words stored in $very_long_string. $very_long_string = "aaaaaaaaaaabbbbbbbbbbbccccccccccccdddddddddddd"; I can do this to split the string into 1 character each and store them in an array: @myArray = split(//, $very_long_string); ... (3 Replies)
Discussion started by: teiji
3 Replies

5. UNIX for Dummies Questions & Answers

Splitting a string and putting another string in the middle?

Hello all! I'm trying to put together a small script that will take in a file name and attach a datestamp to the end of it (but before the file type extension). To illustrate... Before: filename.txt anotherfilename.txt After: filename_20090724.txt anotherfilename_20090724.txt ... (7 Replies)
Discussion started by: jisoo411
7 Replies

6. Shell Programming and Scripting

splitting words from a string

Hi, I have a string like this in a file, I want to retrive the words separated by comma's in 3 variables. like How do i get that.plz advice (2 Replies)
Discussion started by: suresh_kb211
2 Replies

7. UNIX for Dummies Questions & Answers

Help with splitting a string..

Hello I need help with the following. I have strings like #if defined(__def1__) #if defined(__def1__) || defined(__def2__) #if defined(__def1__) && defined(__def2__) && defined(__def3__). #if defined(__def1__) || defined(__def2__) || defined(__def3__). I need to print what is there in... (4 Replies)
Discussion started by: srk
4 Replies

8. Shell Programming and Scripting

Splitting string with awk

Input: Debris Linux is a minimalist, desktop-oriented distribution and live CD based on Ubuntu. It includes the GNOME desktop and a small set of popular desktop applications, such as GNOME Office, Firefox web browser, Pidgin instant messenger, and ufw firewall manager. Debris Linux ships... (5 Replies)
Discussion started by: cola
5 Replies

9. Shell Programming and Scripting

AWK splitting a string of equal parts of 500 chars

Hi , can someone help me how to make an AWK code for splitting a string of equal parts of 500 chars in while loop? Thank you! (4 Replies)
Discussion started by: sanantonio7777
4 Replies

10. 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
SOLRDISMAXQUERY(3)							 1							SOLRDISMAXQUERY(3)

The SolrDisMaxQuery class

INTRODUCTION
CLASS SYNOPSIS
SolrDisMaxQuery SolrDisMaxQueryextends SolrQuerySerializable Inherited properties o const integer$SolrQuery::ORDER_ASC0 o const integer$SolrQuery::ORDER_DESC1 o const integer$SolrQuery::FACET_SORT_INDEX0 o const integer$SolrQuery::FACET_SORT_COUNT1 o const integer$SolrQuery::TERMS_SORT_INDEX0 o const integer$SolrQuery::TERMS_SORT_COUNT1 Methods o public SolrDisMaxQuery SolrDisMaxQuery::addBigramPhraseField (string $field, string $boost, [string $slop]) o public SolrDisMaxQuery SolrDisMaxQuery::addBoostQuery (string $field, string $value, [string $boost]) o public SolrDisMaxQuery SolrDisMaxQuery::addPhraseField (string $field, string $boost, [string $slop]) o public SolrDisMaxQuery SolrDisMaxQuery::addQueryField (string $field, [string $boost]) o public SolrDisMaxQuery SolrDisMaxQuery::addTrigramPhraseField (string $field, string $boost, [string $slop]) o public SolrDisMaxQuery SolrDisMaxQuery::addUserField (string $field) o public SolrDisMaxQuery::__construct ([string $q]) o public SolrDisMaxQuery SolrDisMaxQuery::removeBigramPhraseField (string $field) o public SolrDisMaxQuery SolrDisMaxQuery::removeBoostQuery (string $field) o public SolrDisMaxQuery SolrDisMaxQuery::removePhraseField (string $field) o public SolrDisMaxQuery SolrDisMaxQuery::removeQueryField (string $field) o public SolrDisMaxQuery SolrDisMaxQuery::removeTrigramPhraseField (string $field) o public SolrDisMaxQuery SolrDisMaxQuery::removeUserField (string $field) o public SolrDisMaxQuery SolrDisMaxQuery::setBigramPhraseFields (string $fields) o public SolrDisMaxQuery SolrDisMaxQuery::setBigramPhraseSlop (string $slop) o public SolrDisMaxQuery SolrDisMaxQuery::setBoostFunction (string $function) o public SolrDisMaxQuery SolrDisMaxQuery::setBoostQuery (string $q) o public SolrDisMaxQuery SolrDisMaxQuery::setMinimumMatch (string $value) o public SolrDisMaxQuery SolrDisMaxQuery::setPhraseFields (string $fields) o public SolrDisMaxQuery SolrDisMaxQuery::setPhraseSlop (string $slop) o public SolrDisMaxQuery SolrDisMaxQuery::setQueryAlt (string $q) o public SolrDisMaxQuery SolrDisMaxQuery::setQueryPhraseSlop (string $slop) o public SolrDisMaxQuery SolrDisMaxQuery::setTieBreaker (string $tieBreaker) o public SolrDisMaxQuery SolrDisMaxQuery::setTrigramPhraseFields (string $fields) o public SolrDisMaxQuery SolrDisMaxQuery::setTrigramPhraseSlop (string $slop) o public SolrDisMaxQuery SolrDisMaxQuery::setUserFields (string $fields) o public SolrDisMaxQuery SolrDisMaxQuery::useDisMaxQueryParser (void ) o public SolrDisMaxQuery SolrDisMaxQuery::useEDisMaxQueryParser (void ) Inherited methods o public SolrQuery SolrQuery::addFacetDateField (string $dateField) o public SolrQuery SolrQuery::addFacetDateOther (string $value, [string $field_override]) o public SolrQuery SolrQuery::addFacetField (string $field) o public SolrQuery SolrQuery::addFacetQuery (string $facetQuery) o public SolrQuery SolrQuery::addField (string $field) o public SolrQuery SolrQuery::addFilterQuery (string $fq) o public SolrQuery SolrQuery::addHighlightField (string $field) o public SolrQuery SolrQuery::addMltField (string $field) o public SolrQuery SolrQuery::addMltQueryField (string $field, float $boost) o public SolrQuery SolrQuery::addSortField (string $field, [int $order = SolrQuery::ORDER_DESC]) o public SolrQuery SolrQuery::addStatsFacet (string $field) o public SolrQuery SolrQuery::addStatsField (string $field) o public SolrQuery::__construct ([string $q]) o public void SolrQuery::__destruct (void ) o public bool SolrQuery::getFacet (void ) o public string SolrQuery::getFacetDateEnd ([string $field_override]) o public array SolrQuery::getFacetDateFields (void ) o public string SolrQuery::getFacetDateGap ([string $field_override]) o public string SolrQuery::getFacetDateHardEnd ([string $field_override]) o public array SolrQuery::getFacetDateOther ([string $field_override]) o public string SolrQuery::getFacetDateStart ([string $field_override]) o public array SolrQuery::getFacetFields (void ) o public int SolrQuery::getFacetLimit ([string $field_override]) o public string SolrQuery::getFacetMethod ([string $field_override]) o public int SolrQuery::getFacetMinCount ([string $field_override]) o public bool SolrQuery::getFacetMissing ([string $field_override]) o public int SolrQuery::getFacetOffset ([string $field_override]) o public string SolrQuery::getFacetPrefix ([string $field_override]) o public array SolrQuery::getFacetQueries (void ) o public int SolrQuery::getFacetSort ([string $field_override]) o public array SolrQuery::getFields (void ) o public array SolrQuery::getFilterQueries (void ) o public bool SolrQuery::getHighlight (void ) o public string SolrQuery::getHighlightAlternateField ([string $field_override]) o public array SolrQuery::getHighlightFields (void ) o public string SolrQuery::getHighlightFormatter ([string $field_override]) o public string SolrQuery::getHighlightFragmenter ([string $field_override]) o public int SolrQuery::getHighlightFragsize ([string $field_override]) o public bool SolrQuery::getHighlightHighlightMultiTerm (void ) o public int SolrQuery::getHighlightMaxAlternateFieldLength ([string $field_override]) o public int SolrQuery::getHighlightMaxAnalyzedChars (void ) o public bool SolrQuery::getHighlightMergeContiguous ([string $field_override]) o public int SolrQuery::getHighlightRegexMaxAnalyzedChars (void ) o public string SolrQuery::getHighlightRegexPattern (void ) o public float SolrQuery::getHighlightRegexSlop (void ) o public bool SolrQuery::getHighlightRequireFieldMatch (void ) o public string SolrQuery::getHighlightSimplePost ([string $field_override]) o public string SolrQuery::getHighlightSimplePre ([string $field_override]) o public int SolrQuery::getHighlightSnippets ([string $field_override]) o public bool SolrQuery::getHighlightUsePhraseHighlighter (void ) o public bool SolrQuery::getMlt (void ) o public bool SolrQuery::getMltBoost (void ) o public int SolrQuery::getMltCount (void ) o public array SolrQuery::getMltFields (void ) o public int SolrQuery::getMltMaxNumQueryTerms (void ) o public int SolrQuery::getMltMaxNumTokens (void ) o public int SolrQuery::getMltMaxWordLength (void ) o public int SolrQuery::getMltMinDocFrequency (void ) o public int SolrQuery::getMltMinTermFrequency (void ) o public int SolrQuery::getMltMinWordLength (void ) o public array SolrQuery::getMltQueryFields (void ) o public string SolrQuery::getQuery (void ) o public int SolrQuery::getRows (void ) o public array SolrQuery::getSortFields (void ) o public int SolrQuery::getStart (void ) o public bool SolrQuery::getStats (void ) o public array SolrQuery::getStatsFacets (void ) o public array SolrQuery::getStatsFields (void ) o public bool SolrQuery::getTerms (void ) o public string SolrQuery::getTermsField (void ) o public bool SolrQuery::getTermsIncludeLowerBound (void ) o public bool SolrQuery::getTermsIncludeUpperBound (void ) o public int SolrQuery::getTermsLimit (void ) o public string SolrQuery::getTermsLowerBound (void ) o public int SolrQuery::getTermsMaxCount (void ) o public int SolrQuery::getTermsMinCount (void ) o public string SolrQuery::getTermsPrefix (void ) o public bool SolrQuery::getTermsReturnRaw (void ) o public int SolrQuery::getTermsSort (void ) o public string SolrQuery::getTermsUpperBound (void ) o public int SolrQuery::getTimeAllowed (void ) o public SolrQuery SolrQuery::removeFacetDateField (string $field) o public SolrQuery SolrQuery::removeFacetDateOther (string $value, [string $field_override]) o public SolrQuery SolrQuery::removeFacetField (string $field) o public SolrQuery SolrQuery::removeFacetQuery (string $value) o public SolrQuery SolrQuery::removeField (string $field) o public SolrQuery SolrQuery::removeFilterQuery (string $fq) o public SolrQuery SolrQuery::removeHighlightField (string $field) o public SolrQuery SolrQuery::removeMltField (string $field) o public SolrQuery SolrQuery::removeMltQueryField (string $queryField) o public SolrQuery SolrQuery::removeSortField (string $field) o public SolrQuery SolrQuery::removeStatsFacet (string $value) o public SolrQuery SolrQuery::removeStatsField (string $field) o public SolrQuery SolrQuery::setEchoHandler (bool $flag) o public SolrQuery SolrQuery::setEchoParams (string $type) o public SolrQuery SolrQuery::setExplainOther (string $query) o public SolrQuery SolrQuery::setFacet (bool $flag) o public SolrQuery SolrQuery::setFacetDateEnd (string $value, [string $field_override]) o public SolrQuery SolrQuery::setFacetDateGap (string $value, [string $field_override]) o public SolrQuery SolrQuery::setFacetDateHardEnd (bool $value, [string $field_override]) o public SolrQuery SolrQuery::setFacetDateStart (string $value, [string $field_override]) o public SolrQuery SolrQuery::setFacetEnumCacheMinDefaultFrequency (int $frequency, [string $field_override]) o public SolrQuery SolrQuery::setFacetLimit (int $limit, [string $field_override]) o public SolrQuery SolrQuery::setFacetMethod (string $method, [string $field_override]) o public SolrQuery SolrQuery::setFacetMinCount (int $mincount, [string $field_override]) o public SolrQuery SolrQuery::setFacetMissing (bool $flag, [string $field_override]) o public SolrQuery SolrQuery::setFacetOffset (int $offset, [string $field_override]) o public SolrQuery SolrQuery::setFacetPrefix (string $prefix, [string $field_override]) o public SolrQuery SolrQuery::setFacetSort (int $facetSort, [string $field_override]) o public SolrQuery SolrQuery::setHighlight (bool $flag) o public SolrQuery SolrQuery::setHighlightAlternateField (string $field, [string $field_override]) o public SolrQuery SolrQuery::setHighlightFormatter (string $formatter, [string $field_override]) o public SolrQuery SolrQuery::setHighlightFragmenter (string $fragmenter, [string $field_override]) o public SolrQuery SolrQuery::setHighlightFragsize (int $size, [string $field_override]) o public SolrQuery SolrQuery::setHighlightHighlightMultiTerm (bool $flag) o public SolrQuery SolrQuery::setHighlightMaxAlternateFieldLength (int $fieldLength, [string $field_override]) o public SolrQuery SolrQuery::setHighlightMaxAnalyzedChars (int $value) o public SolrQuery SolrQuery::setHighlightMergeContiguous (bool $flag, [string $field_override]) o public SolrQuery SolrQuery::setHighlightRegexMaxAnalyzedChars (int $maxAnalyzedChars) o public SolrQuery SolrQuery::setHighlightRegexPattern (string $value) o public SolrQuery SolrQuery::setHighlightRegexSlop (float $factor) o public SolrQuery SolrQuery::setHighlightRequireFieldMatch (bool $flag) o public SolrQuery SolrQuery::setHighlightSimplePost (string $simplePost, [string $field_override]) o public SolrQuery SolrQuery::setHighlightSimplePre (string $simplePre, [string $field_override]) o public SolrQuery SolrQuery::setHighlightSnippets (int $value, [string $field_override]) o public SolrQuery SolrQuery::setHighlightUsePhraseHighlighter (bool $flag) o public SolrQuery SolrQuery::setMlt (bool $flag) o public SolrQuery SolrQuery::setMltBoost (bool $flag) o public SolrQuery SolrQuery::setMltCount (int $count) o public SolrQuery SolrQuery::setMltMaxNumQueryTerms (int $value) o public SolrQuery SolrQuery::setMltMaxNumTokens (int $value) o public SolrQuery SolrQuery::setMltMaxWordLength (int $maxWordLength) o public SolrQuery SolrQuery::setMltMinDocFrequency (int $minDocFrequency) o public SolrQuery SolrQuery::setMltMinTermFrequency (int $minTermFrequency) o public SolrQuery SolrQuery::setMltMinWordLength (int $minWordLength) o public SolrQuery SolrQuery::setOmitHeader (bool $flag) o public SolrQuery SolrQuery::setQuery (string $query) o public SolrQuery SolrQuery::setRows (int $rows) o public SolrQuery SolrQuery::setShowDebugInfo (bool $flag) o public SolrQuery SolrQuery::setStart (int $start) o public SolrQuery SolrQuery::setStats (bool $flag) o public SolrQuery SolrQuery::setTerms (bool $flag) o public SolrQuery SolrQuery::setTermsField (string $fieldname) o public SolrQuery SolrQuery::setTermsIncludeLowerBound (bool $flag) o public SolrQuery SolrQuery::setTermsIncludeUpperBound (bool $flag) o public SolrQuery SolrQuery::setTermsLimit (int $limit) o public SolrQuery SolrQuery::setTermsLowerBound (string $lowerBound) o public SolrQuery SolrQuery::setTermsMaxCount (int $frequency) o public SolrQuery SolrQuery::setTermsMinCount (int $frequency) o public SolrQuery SolrQuery::setTermsPrefix (string $prefix) o public SolrQuery SolrQuery::setTermsReturnRaw (bool $flag) o public SolrQuery SolrQuery::setTermsSort (int $sortType) o public SolrQuery SolrQuery::setTermsUpperBound (string $upperBound) o public SolrQuery SolrQuery::setTimeAllowed (int $timeAllowed) PREDEFINED CONSTANTS
o SolrDisMaxQuery::ORDER_ASC -Used to specify that the sorting should be in acending order (Duplicated for easier migration) o SolrDisMaxQuery::ORDER_DESC -Used to specify that the sorting should be in descending order (Duplicated for easier migration) o SolrDisMaxQuery::FACET_SORT_INDEX -Used to specify that the facet should sort by index (Duplicated for easier migration) o SolrDisMaxQuery::FACET_SORT_COUNT -Used to specify that the facet should sort by count (Duplicated for easier migration) o SolrDisMaxQuery::TERMS_SORT_INDEX -Used in the TermsComponent (Duplicated for easier migration) o SolrDisMaxQuery::TERMS_SORT_COUNT -Used in the TermsComponent (Duplicated for easier migration) PHP Documentation Group SOLRDISMAXQUERY(3)
All times are GMT -4. The time now is 04:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy