Annihilannic.
Thank you for the quick response. Will try that out. Have unintentionally ignored split() from my consideration... No reason. Just failed to consider.
Thanks again, and have a great day.
Dougc
I have a pipe delimited file with 20+ fields per record.
What I need to do is match a "portion" of one field against a portion of another field, and where an exception exists write the record out to a file for investigation and correction.
The fields are not fixed length, and the key character...
futurelet,
I tried your code and it ran to a point and then posted and out of memory error.
What I did was save your AWK code of:
BEGIN{FS="|"}
$2 in a{next}{print;
a[$2]}
I then saved it as: ddupe2.awk
I then ran it using: awk -fddupe2.awk tst2.txt
It processed a portion of the file...
PHV.
Thank you very much. I tried your code with the file that was dying and worked like a champ.
I saved your code as: ddupe.awk and ran it from the command prompt using awk -fddupe.awk tst.txt
BEGIN{FS="|"}
$2!=ref{print;ref=$2}
It wittled the file down as expected.
Again thank you.
Doug C
Well... Back to the drawing board..
For a larger file it fails. Had an 80k file and it gives me an out of memory error with the DOS based version of AWK I am running.
Oh well. Back at it again.
Thanks,
Dougc
jdrocea,
Found the solution... ReGoogled and found on
http://www.computing.net/unix/wwwboard/forum/7011.html
I had to tweak it a little, but since my test file is based on second field, I changed their code to add a BEGIN and used the $2.
Works fine.
Thanks all.
BEGIN {FS="|"}
{
if ($2...
PH
Thanks for the code.
Unfortunately, when I try it, it returns the all the rows. I prefaced your code with a BEGIN {FS="|"} too.
Search continues.
Thanks again.
Dougc
Ladies and Gentlemen,
I am struggling to find a way to remove duplicate lines from a pipe delimited file utilzing AWK.
I get a file between 2k-5k
The file is Sorted by the REF column.
SAMPLE INPUT FILE
CD|REF|NAME|Month|Year
A12345N|123123|GALLAGH T|09|2007
D2345AN|123123|GALLAGH T|09|2007...
Kevin,
Ok you get the star.. Your second response just dropped in through the firewall...
When I sent my last note I just started typing and failed to read your post..
Thanks for the help...
Dougc
imamstillatwork,
Figured out my problem.. Was a SUP.
<cffile
action="UPLOAD"
filefield="#arguments.formField#"
destination="#arguments.destination#"
nameconflict="#arguments.nameconflict#"
accept="#arguments.accept#"
attributes = "normal"
result = "result_name">...
imstillatwork,
Thanks for the suggestion.
Tried that and I get:
struct
AFILE C:\JRun4\servers\uat\SERVER-INF\temp\cfusion.war-tmp\neotmp51021.tmp
FIELDNAMES AFILE
C:\JRun4\servers\uat\SERVER-INF\temp\cfusion.war-tmp\neotmp51021.tmp
struct [empty]
: from within cfc
struct [empty]...
Ladies and Gentlemen,
I hope someone can possibly provide some direction or help on this.
Trying to create a simple file upload with a CFC doing the processing.
Simple business rules.
1) Restrict the file type to Word
2) Upload one file (not multiples)
3) Assume the user will have Word...
Stupid User Question....
I have an application that mgt has asked for that from my limited knowledge should be constructed as an OLAP vs OLTP (which all of our apps are on our server right now under SQL Server 2000 on Win2k3).
Long ago in an SQL Server Class I have a vague understanding that...
tsuji,
Fantastic.. Thanks so much..
Regex has so much power. I need to learn more, but no one in my office knows it or atleast admits it.
Thanks again.
Dougc
kaht,
Thanks.. That will assist me on this project and another project.
However, in reviewing your code, it will, it appears permit successful validating of any email address with this structure @subdomain.domain.org
But my real problem in this instance is, how can I check to see if that...
I have a question. One that my meager brain can fathom but cannot resolve.
I would like use a regex function to validate whether or not the user has entered the expected @subdomain.domain.org
Specifically, I need to make sure the users key in as an example: theirname@core.company.com where...
Dan,
A thousand pardon's.
Yes it did..
Have been out of pocket, between work, and more importantly family health problem, have not been on line .
It solved the problem.. Stars to you.. And shame on me..
I got your posting.. And after testing it I thought I had responded, but clearly I did...
I am trying to create a function that can be called from a form to ensure only appropriate checkboxes are selected.
I can create "hard coded" code for each grouping but with at present 30 groupings with the potential of more, that is neither smart nor prudent.
I have checked the books I have...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.