Search Results

Search: Posts Made By: arunshankar.c
2,505
Posted By arunshankar.c
Pass perl array to SQL oracle
Hello,

Could someone please suggest if there is a way to pass an perl array(pass @v_array) to SQL as in below eg :


#!/usr/bin/perl

@v_array = (1,2,4,5,6,8);
$db_userid = 'ni71/ni711';...
1,335
Posted By arunshankar.c
Thank you, Birei. It worked !!!
Thank you, Birei. It worked !!!
1,335
Posted By arunshankar.c
I think cat -n is used to cat multiple files not...
I think cat -n is used to cat multiple files not for this case to get the number of lines till a pattern matches in file.

Can you please suggest if my understanding is wrong here ?
1,335
Posted By arunshankar.c
Get the number of lines till I get line
Hi All,

I have a file as below:


abc.txt

******************************
* HEADER DESCRIPTION
******************************
*Supplier: Prism
Customer: MNI -NIGERIA...
21,943
Posted By arunshankar.c
The above solution worked well :) =>...
The above solution worked well :)



=> awk -F"," '/5/ {if ($4=="5") print FNR}' abcdefg.txt
5



Thank you ahamed.
21,943
Posted By arunshankar.c
search a string in a particular column of file and return the line number of the line
Hi All,

Can you please guide me to search a string in a particular column of file and return the line number of the line where it was found using awk. As an example :

abc.txt

...
2,108
Posted By arunshankar.c
=> cat file2.txt 7000,2,1,6 7001,2,1,7 ...
=> cat file2.txt
7000,2,1,6
7001,2,1,7
7002,2,1,6
7003,1,2,1

[carun@fattony] /u/carun/MTNN>
=> cat file1.txt
7000,2,1,6
7001,2,1,7
7002,2,1,6
7003,1,2,5

awk -F',' -v file1="$1" -v...
2,108
Posted By arunshankar.c
[carun@fattony] /u/carun/MTNN> => cat file2.txt...
[carun@fattony] /u/carun/MTNN>
=> cat file2.txt
7000,2,1,6
7001,2,1,7
7002,2,1,6
7003,1,2,1

[carun@fattony] /u/carun/MTNN>
=> cat file1.txt
7000,2,1,6
7001,2,1,7
7002,2,1,6
7003,1,2,5
...
2,108
Posted By arunshankar.c
Currently, only the non matching values in file2...
Currently, only the non matching values in file2 with file1 is getting displayed without any information about the file1 values. I actually requested for help on the output such that the exact...
2,108
Posted By arunshankar.c
Also please suggest if the error'd string can...
Also please suggest if the error'd string can also added in the output with appropriate message as below (I did not request for this previously):

column 4 in file1.txt having value 6 and column 7...
2,108
Posted By arunshankar.c
I am sorry, my mistake. => awk -F',' -v...
I am sorry, my mistake.
=> awk -F',' -v file1="$1" -v file2="$2" 'NR == FNR {a[$1,$2,$3,$4]++;count++;next} !(a[$1,$3,$6,$7]){print FNR FS $0}' OFS="," 1.txt 2.txt
2,7000,john,2,0,0,1,7...
2,108
Posted By arunshankar.c
=> awk -F',' -v file1="$1" -v file2="$2" 'NR ==...
=> awk -F',' -v file1="$1" -v file2="$2" 'NR == FNR {a[$1,$2,$3,$4]++;next} !(a[$1,$2,$3,$4]); END{for(X in a) N++; print N }' OFS="," 1.txt 2.txt
7000,john,2,0,0,1,6
7000,john,2,0,0,1,7...
2,108
Posted By arunshankar.c
Need the line number of failed records
Hi awk Gurus,

I have file as below :

file1.txt

7000,2,1,6
7001,2,1,7
7002,2,1,6
7003,1,2,1

file2.txt

7000,john,2,0,0,1,6
7000,john,2,0,0,1,7
7000,john,2,0,0,1,8...
2,631
Posted By arunshankar.c
Currently I have 2 functions, one to check if the...
Currently I have 2 functions, one to check if the elements are in sequence and the other to get only those part of the file that needs to be checked for sequence

1) Cut only the columns of file...
2,631
Posted By arunshankar.c
Check Sequence
*
Expiry DATE:
*
Address1:
Address2:
Address3:
Address4:
Address5:
*
PO_ref_number: aadad
HolderId_1:
HolderId_2:
HolderId_3:
HolderId_4:
*
adad: 00000
ada: ...
4,907
Posted By arunshankar.c
For the below Suggestion I got the error as...
For the below Suggestion I got the error as below.
awk --re-interval 'BEGIN { count=0; found=0 } { if(/Kitnb\/ICCID1\/ICCID2/) { found=1; next } if(/^([0-9]*\,){8}([0-9]*)$/ && found) { count++; }...
4,907
Posted By arunshankar.c
Variable as input to awk command
Hi Gurus,

I need a suggestion, please help. I have a input file as below :
abc.txt :

*
xxxx: 00000
xxxxx: 00000
xxxx: RANDOM
xxx: RANDOM...
Showing results 1 to 17 of 17

 
All times are GMT -4. The time now is 04:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy