you are right but the second files is many records data I wnant to make some change onit look to the example now:
first file like this
00123211025469700000120000000012365478965412300000
and the second file is select statment from oracle like this
0625488 02159 112364 12654
depinding to the first record i want to make my modifing
jim mcnamara can give me tha aidia of solution in awk
look the first file like this:
000000010415FLT_P_708
100000010599000278260
210000000000000000000
140000010716000278260
160000010686000278260
200000010117000278260
200000020117000278260
200000030117000278260
290000010149000278260
and the second file like this :
0278260 215 1254
0953665 254 1236
do you see the boold part in the first file he does match the fist field in the second file (and note i wnat to work on records that begin with 10 in the first file)
how we can do that with fast program in awk
Based on your requirements:
firstfile - if it starts with "10" - the last 7 chars are a possible search key
secondfile - if the first column matches any of the search keys, print the whole record.
I want to recopy all the records on the first file not just 10
but when the key search on 10 match the field1 on the second file make some change on record 10 for example add the second field from the second to the end of record 10 or modify a specific part on record 10
hope its clear now
can you tell me site or document for more details for awk I/O because I need more explain
Quote:
Originally Posted by jim mcnamara
Based on your requirements:
firstfile - if it starts with "10" - the last 7 chars are a possible search key
secondfile - if the first column matches any of the search keys, print the whole record.
Long story short: I'm working inside of a Unix SSH under a bash shell. I have to code a C program that generates a random number. Then I have to call the compiled C program with a Perl program to run the C program 20 times and put all the generated random #s into a text file, then print that text... (1 Reply)
Hi,
i want to write a script that executes a program (exec?) .
this program then requires a filename as input.
how do i give it this input in the script so the program will be complete run and close by the script.
e.g.
exec prog.exe
program then asks for filename
"enter filename:"... (1 Reply)