Search Results

Search: Posts Made By: kittiwas
2,485
Posted By kittiwas
script is work Thank you
script is work Thank you
2,485
Posted By kittiwas
Print Line if next line Match a pattern
Hi All,

Does anyone know how to print 1H1A....... in peal script
print line ^1H1A....... if next line equal 5R0RECEIPT....

Thank for help:D

Cat st.txt...
1,854
Posted By kittiwas
Script more list_input.txt acc_input1 ...
Script

more list_input.txt
acc_input1
acc_input2

more acc_input1
0001
0003

more acc_input2
0002


while read K
do
ACCT2=`more ${K}|perl -i -pe "s/\n$//g"|awk '{print...
1,854
Posted By kittiwas
Thank you pravin27...
Thank you pravin27 (https://www.unix.com/members/302068616.html) for Script :D
1,854
Posted By kittiwas
perl search string for cut data
perl -lne '$/="1H1XXXXX";print $_ if /0001|0002|0003/' data.txt> output.txt

more data.txt
1H1XXXXX|0001|Y|
aaa
bbb
ccc
1H1XXXXX|0005|N|
bbb
g
1H1XXXXX|0001|Y|
hhh
ddd
222...
2,788
Posted By kittiwas
Thank you Very muck Script it OK ...
Thank you Very muck Script it OK



---------- Post updated at 04:23 PM ---------- Previous update was at 04:21 PM ----------

Thank you (kob khun Krab in thai style):D
2,788
Posted By kittiwas
Script nawk is OK thank you Please help Edit...
Script nawk is OK thank you
Please help Edit in perl Script
nawk '/^START/ {s=""} /NO 0003\/02/ {p=1} /^END/&&p {print s RS $0;p=0} {s=s RS $0}' gg.txt
2,788
Posted By kittiwas
Error and awk Slow in Data > 1,000,000 Line ...
Error
and awk Slow in Data > 1,000,000 Line
i want use perl Script
2,788
Posted By kittiwas
Cut Data In Bigfile with Perl
I want to create new file for START-END
but i know NO 0003/02 only one in file

Ex. Data FILE Data.txt (Data ~1,000,000 Line)

I use Script perl
perl -lne '$/="END";print $_."END" if...
1,379
Posted By kittiwas
thank you For Script :D pravin27 and danmero ...
thank you For Script :D pravin27 and danmero

nawk -F\" 'NR==FNR{a[$0];next}$2 in a{sub($2,"un_"$2)}1' input.txt file*.txt > resoult.txt

if i have file1.txt, file2.txt, file3.txt
script is work...
1,379
Posted By kittiwas
Please Help again to Check script Search and Replace with nawk
Please Help to Check script Search and Replace
Ex. Search 0001 and Replete un_0001


---script
Code:

nawk -F\" 'NR==FNR{a[$0];next}$2 in a{sub($2,"un_"$2)}1' input.txt file*.txt >...
1,621
Posted By kittiwas
thank you for perl code very fast :)
thank you for perl code very fast :)
1,621
Posted By kittiwas
Cut Data In Bigfile
I want to create new file for 'NO 0004/01' and 'NO 0005/01' only
How can i do It for shot time

Data FILE Data.txt (Data ~1,000,000 Line)

START
NO 0001/01
HEAD AAAA
BODY1 AAA
BODY2 AAA...
1,283
Posted By kittiwas
Big thank
Big thank
1,283
Posted By kittiwas
awk 2 field
Can anyone help me
Filename test.txt
200903040010640767,50300140,News,5,0,66872301819,1,1,2009/03/04 18:05:29,2009/03/04 23:50:32,17,0,0,8,138,2,24,0,,32,smca2p...
1,778
Posted By kittiwas
awk 2 field
awk '/<assertion id="4"/, /<\/assertion>/ {
sub(/id="[^"]*"/, "id=\""nid"\"")
print
}' nid="$var" infile
Showing results 1 to 16 of 16

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