nested looping question


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting nested looping question
# 8  
Old 09-26-2003
Details! Details! Thanks for the schooling!! Im always learning.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk nested looping?

I am trying to parse a text file and send its output to another file but I am having trouble conceptualizing how I am supposed to do this in awk. The text file has a organization like so: Name Date Status Location (city, state, zip fields) Where each of these is on a separate line in... (1 Reply)
Discussion started by: kellyanneghj
1 Replies

2. Shell Programming and Scripting

Nested looping statements

I cannot get the code below to work correctly. The IF statement works just fine, but not the looping. The inner loop tries to find files for a given vendor; if found, I need to sleep giving another process time to move the files. Once the given vendor's files are gone, then I want to move on to the... (1 Reply)
Discussion started by: dgreene
1 Replies

3. Shell Programming and Scripting

syntax question in regards to nested awk statements

Hello all, I am writing up an input file and I was hoping I could get some guidance as to how to best consolidate these 2 awk statements for 1 while loop. Here's my input file # cat databases.lst #NOTE: These entries are delimited by tabs "\t" #oracleSID name/pass # db11 ... (2 Replies)
Discussion started by: Keepcase
2 Replies

4. Homework & Coursework Questions

Help with looping question

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I need to write a script that accepts 3 filenames as command line parameters and test if they are executable and... (1 Reply)
Discussion started by: tommynewb
1 Replies

5. UNIX for Dummies Questions & Answers

Bourne-sh (not bash) question about nested loops and sed

Here's the input: alpha, numeric or alphanumeric string ("line 1 string") numeric string ("line 2 string") numeric string ("line 3 string") numeric string ("line 4 string") ... where - each numeric string is in a pattern that can be matched with RE but - there can be any number of... (2 Replies)
Discussion started by: uiop44
2 Replies

6. Shell Programming and Scripting

Nested if question BASH

Just started learning bash ,and I am confused with sintaksis line 16: syntax error near unexpected token `else' thanks #!/bin/bash echo -n "Enter: " read num if(($(echo ${#num}) == 0 )) then echo No arguments passed.Try again elif rem=$(echo $num | tr -d ) ... (7 Replies)
Discussion started by: lio123
7 Replies

7. UNIX for Dummies Questions & Answers

Nested If question

if ]; then if ]; then rm -f ${LOGFILE}.old fi mv ${LOGFILE} ${LOGFILE}.old fi Havent done nested ifs in a while. I'm reading someones code If I'm reading this correctly. It checks for the logfile, and if it exists it checks for the old logfile and if that exists, it removes the... (8 Replies)
Discussion started by: NycUnxer
8 Replies

8. Shell Programming and Scripting

looping search question

This is my requirement-- I have a list file that contains a list of 50 words. eg word1 word2 word3 I want to search/grep for each of those words in a directory/and subdirectories and list the file in which that word exists. Ne ideas for script/command? I know grep -r <pattern>... (3 Replies)
Discussion started by: alfredo123
3 Replies

9. Shell Programming and Scripting

Looping question

Hi, I have series of data stored in a variable xyz: (between 0 and 100) example: 20 45 98 21..... I need to find if there is/are any occurance of data > 95 Not sure what kind of looping is required to check. Please help. thanks (2 Replies)
Discussion started by: hemangjani
2 Replies

10. UNIX for Dummies Questions & Answers

looping question

I am writing a simple script and want to keep the user in a fuction until they are ready to get out. For some (probably stupid) reason, it doesn't seem to be working. You guys see anything that I'm overlooking? crsd() {until do /home/wcs3611.crsdtmp.sh echo 'run another? \c' ... (1 Reply)
Discussion started by: hedrict
1 Replies
Login or Register to Ask a Question
MB_STRSTR(3)								 1							      MB_STRSTR(3)

mb_strstr - Finds first occurrence of a string within another

SYNOPSIS
string mb_strstr (string $haystack, string $needle, [bool $before_needle = false], [string $encoding = mb_internal_encoding()]) DESCRIPTION
mb_strstr(3) finds the first occurrence of $needle in $haystack and returns the portion of $haystack. If $needle is not found, it returns FALSE. PARAMETERS
o $haystack - The string from which to get the first occurrence of $needle o $needle - The string to find in $haystack o $before_needle - Determines which portion of $haystack this function returns. If set to TRUE, it returns all of $haystack from the beginning to the first occurrence of $needle (excluding needle). If set to FALSE, it returns all of $haystack from the first occurrence of $needle to the end (including needle). o $encoding - Character encoding name to use. If it is omitted, internal character encoding is used. RETURN VALUES
Returns the portion of $haystack, or FALSE if $needle is not found. SEE ALSO
stristr(3), strstr(3), mb_stristr(3). PHP Documentation Group MB_STRSTR(3)