End of loop condition required???


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting End of loop condition required???
Prev   Next
# 1  
Old 07-16-2007
End of loop condition required???

Hi

i have a variable with lots of tokens seperated with spaces.

e.g VAR="ABC DEF GHSD GHQS TUTSD JHDTQ QDHQ CDQKDGQ WQUTQD DQUTQD DQJGDQ QDTQD WDQUTQDU QDUGQD QDJGQD DQUTDUQ QDUIDTQ"
i want to separate all of the above tokens and call a script with each of the token e.g sh script.sh <TOKEN>



Can anybody provide the logic script ? I am cofused about the end of the loop condition.

Thanks
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell file if condition setting start and end dates

I have shell file that has the following logic, i am new to shell programming. What does process month $1 do? I am assuming that the below dates go back three months from sysdate month. is it right : curr_month=`date +%Y%m` Beg_o_time=`date -d "2012/03/01" +%Y%m` Process_months=$1... (1 Reply)
Discussion started by: cplusplus1
1 Replies

2. UNIX for Dummies Questions & Answers

Bash condition test at the end of string

I want to check (using bash condition test function) if string contains three spaces, ignoring last three spaces at the end of string. string_to_report='foo bar foo bar ' string_to_ignore='foo bar ' (8 Replies)
Discussion started by: useretail
8 Replies

3. Shell Programming and Scripting

If condition help required

I have a if condition it checks its pid exist it means it is running, otherwise not running. I am checking with ps x=`ps -fu myuserid|grep java| |grep -v grep | awk '{print $2}'` if then ............ Above code is giving integer error, because currently process of java is... (4 Replies)
Discussion started by: learnbash
4 Replies

4. Shell Programming and Scripting

While Loop with if else condition

Hi, I was trying to write a shell script which reads csv file and sends mail in html format along with tables. Hope i have completed 1st part , but while sending mail i was trying to highlight some rows in the table based on the egrep outcome. If the string exists in line/INPUT, i am trying to... (4 Replies)
Discussion started by: varmas424
4 Replies

5. Shell Programming and Scripting

Help with extract info if fulfill condition required

Input file (4 DATA record shown in this case): DATA AA0110 ACCESSION AA0110 VERSION AA0110 GI:157412239 FEATURES Location/Qualifiers length 1..1170 1..1700 /length="1170" position ... (5 Replies)
Discussion started by: perl_beginner
5 Replies

6. Shell Programming and Scripting

Print required values at end of the file by using AWK

I am looking help in awk, quick overview. we will get feed from external system . The input file looks like below. Detail Id Info Id Order Id STATUS Status Date FileDetail 99127942 819718 CMOG223481502 PR 04-17-2011 06:01:34PM... (7 Replies)
Discussion started by: dvrbabu
7 Replies

7. Shell Programming and Scripting

Use of -z in while loop condition

Hi, Could you please tell what is the meaning of -z in while loop condition. For example, while ; do echo "*** Enter the age " readage (3 Replies)
Discussion started by: vidyaj
3 Replies

8. Shell Programming and Scripting

if condition in a while loop

Gurus, I need to read a line from a file and strip the characters from it and compare the stripped value with the value I pass to the script while executing it. Below is the code for the same. But when i execute the code, it is throwing an error. #!/bin/ksh . /home/.i_env ... (14 Replies)
Discussion started by: svajhala
14 Replies

9. Programming

Why is required to leave an empty line at the end of a C program?

I know it looks like a stupid question, but i really wanna know the reason. Actually, i think it's because the c compiler will detect it as the end of file "EOF" of the program, but, am i wrong? because it compiles it anyway, but keep showing warnings like "no new line at the end of file". I... (8 Replies)
Discussion started by: semash!
8 Replies

10. UNIX for Advanced & Expert Users

Urgent Help required : awk/sed help to find pattern and delete till end of line

Hi, I need help with using an awk or sed filter on the below line ALTER TABLE "ACCOUNT" ADD CONSTRAINT "ACCOUNT_PK" PRIMARY KEY ("ACCT_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "WMC_DATA" LOGGING ENABLE Look for... (1 Reply)
Discussion started by: rajan_san
1 Replies
Login or Register to Ask a Question
MKOCTFILE(1)						      General Commands Manual						      MKOCTFILE(1)

NAME
mkoctfile - Compile dynamic-load modules for GNU Octave SYNOPSIS
mkoctfile [-IDIR] [-DDEF] [-lLIB] [-LDIR] [-M|--depend] [-c] [-o FILE|--output FILE] [-p VAR|--print VAR] [-s|--strip] [-v|--ver- bose] [-h|-?|--help] file ... DESCRIPTION
mkoctfile is used to compile source C, C++ or Fortran source code in dynamically loadble file for octave(1). OPTIONS
mkoctfile accepts the following options: -IDIR Add include directory DIR to compile commands. -DDEF Add definition DEF to compiler call. -lLIB Add library LIB to link command. -LDIR Add library directory DIR to link command. -M|--depend Generate dependency files (.d) for C and C++ source files. -c Compile but do not link. -o FILE|--output FILE Output file name; default extension is .oct. -p VAR|--print VAR Print configuration variable VAR. Recognized variables are: CPPFLAGS CPICFLAG INCFLAGS CXX F2C CXXFLAGS F2CFLAGS CXXPICFLAG F77 XTRA_CFLAGS FFLAGS XTRA_CXXFLAGS FPICFLAG SHLEXT CC SH_LD CFLAGS SH_LDFLAGS -s|--strip Strip the output file. -v|--verbose Echo commands as they are executed. file Compile or linke file. Recognised file types are .c C source .cc C++ source .C C++ source .cpp C++ source .f Fortran source .F Fortran source .o object file .SH SEE ALSO .BR octave (1). AUTHOR
John W. Eaton <jwe@bevo.che.wisc.edu> This manual page was contributed by Dirk Eddelbuettel <edd@debian.org> for the Debian GNU/Linux distribution but may be used by others. GNU Octave 1 November 2002 MKOCTFILE(1)