04-02-2012
How about an awk script enclosed in a ksh wrapper...
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi All,
i have a variable which has a value in it.
RETAILER='JEWL'
i have a text file. Name: file.txt
file.txt
________
WLG 150
JEWL 60
CVS 240
FLN 120
WND 120
I am trying to write a korn script.the script, based on the value in the RETAILER will do a look up against the... (5 Replies)
Discussion started by: pavan_test
5 Replies
2. UNIX for Advanced & Expert Users
Hi,
I have the following requirement.
I have one lookup file which contains 15 columns and 7000 records.
Ex:
123,MEDICA,134,145,1178,123,678,345,2345,HP,COL,K12,SR,OX,78919
I have input file which contains 14 columns and 20 million records.Some times the record count is more than 20... (1 Reply)
Discussion started by: ukatru
1 Replies
3. Shell Programming and Scripting
Hi,
I have the following requirement.
I have one lookup file which contains 15 columns and 7000 records.
Ex:
123,MEDICA,134,145,1178,123,678,345,2345,HP,COL,K12,SR,OX,78919
I have input file which contains 14 columns and 20 million records.Some times the record count is more... (4 Replies)
Discussion started by: ukatru
4 Replies
4. Shell Programming and Scripting
I have two files ,File1 lookup to file2 based on 1st&3rd against 1st and 2nd column and produce the following o/p
File1
450000|USD|USD
450006|GKSGD|SGD
450002|XSGD|SGD
File2
-----
450000|USD|2000.00|10000.000
450006|SGD|1000.200|3000.000
450002|SGD|3000.000|20000.00
O/p
... (4 Replies)
Discussion started by: mohan705
4 Replies
5. UNIX for Advanced & Expert Users
Write a quick shell snippet to find all of the IPV4 IP addresses
in any and all of the files under /var/lib/output/*, ignoring
whatever else may be in those files. Perform a reverse lookup on
each, and format the output neatly, like "IP=192.168.0.1,
... (0 Replies)
Discussion started by: choco4202002
0 Replies
6. Shell Programming and Scripting
Hi,
need your help to lookup these 2 files
main.txt
RNPMS01,PMS717W_Marasi,CXP9016141/1_R7G04,EXECUTING
RNPMS01,RAP765W_BakaranBatu,CXP9014346/1_R6AG03,EXECUTING
RNPMS01,RNPMS01,CXP9014711/2_R5Z,EXECUTING
RNPMS01,TBT510W_Bandar_Utama,CXP9014346/1_R6AG03,EXECUTING... (8 Replies)
Discussion started by: singgih
8 Replies
7. UNIX for Dummies Questions & Answers
I have the below 2 files:
1) Third field from file1.txt should be compared to the first field of lookup.txt.
2) If match found then third field, file1.txt should be substituted with the second field from lookup.txt.
3)Else just print the line from file1.txt.
File1.txt:... (4 Replies)
Discussion started by: venalla_shine
4 Replies
8. Shell Programming and Scripting
Hi All,
I want to lookup name for an id in col2 input from another file and add the name to each line.
Input 1
comp100001_c0_seq1 At1g31340 30.40 569 384 11 3 1673 313 834 7e-62 237
comp100003_c0_seq1 At1g35370_2 35.00 80 50 ... (7 Replies)
Discussion started by: gina.lizar
7 Replies
9. Shell Programming and Scripting
A text file has two logs of same event & both logs have to be correlated into a single line before same can be processed further
RAW
OPERATING LOG
Date Month Year Time Event
10 JAN 2014 1000 4
11 APR 2013 1230 2
12 FEB 2014 ... (7 Replies)
Discussion started by: newageBATMAN
7 Replies
10. Shell Programming and Scripting
Hi Experts,
I need you help in coding the below scenario in unix. Please help
Lets say i have below 2 records in my file1
a;b;c
a;d
and in file 2 , i have the below information
a:alpha
b:beta
c:code
d:delta
then i want to lookup on file2 and replace my content in file... (2 Replies)
Discussion started by: ashishagg2005
2 Replies
break(1) User Commands break(1)
NAME
break, continue - shell built-in functions to escape from or advance within a controlling while, for, foreach, or until loop
SYNOPSIS
sh
break [n]
continue [n]
csh
break
continue
ksh
*break [n]
*continue [n]
DESCRIPTION
sh
The break utility exits from the enclosing for or while loop, if any. If n is specified, break n levels.
The continue utility resumes the next iteration of the enclosing for or while loop. If n is specified, resume at the n-th enclosing loop.
csh
The break utility resumes execution after the end of the nearest enclosing foreach or while loop. The remaining commands on the current
line are executed. This allows multilevel breaks to be written as a list of break commands, all on one line.
The continue utility continues execution of the next iteration of the nearest enclosing while or foreach loop.
ksh
The break utility exits from the enclosed for, while, until, or select loop, if any. If n is specified, then break n levels. If n is
greater than the number of enclosing loops, the outermost enclosing loop shall be exited.
The continue utility resumes the next iteration of the enclosed for, while, until, or select loop. If n is specified then resume at the n-
th enclosed loop. If n is greater than the number of enclosing loops, the outermost enclosing loop shall be used.
On this man page, ksh(1) commands that are preceded by one or two * (asterisks) are treated specially in the following ways:
1. Variable assignment lists preceding the command remain in effect when the command completes.
2. I/O redirections are processed after variable assignments.
3. Errors cause a script that contains them to abort.
4. Words that follow a command preceded by ** that are in the format of a variable assignment are expanded with the same rules as a vari-
able assignment. This means that tilde substitution is performed after the = sign, and also that word splitting and file name genera-
tion are not performed.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
csh(1), exit(1), ksh(1), sh( 1), attributes(5)
SunOS 5.10 17 Jul 2002 break(1)