Search Results

Search: Posts Made By: chickeneaterguy
1,702
Posted By chickeneaterguy
File Field Replacement, Assigning Fields to Variables, Lists/Arrays?
Okay, I've made threads on extracting fields and comparing strings in separate files in .csv's. I've written the following code with intentions of learning more.

I just want this one question...
2,885
Posted By chickeneaterguy
Thanks, you're amazing! And can you explain...
Thanks, you're amazing!

And can you explain to me why you matched " -11 -21 " and still got it to work rather than the blood types? Confused.
2,885
Posted By chickeneaterguy
Say I have #names.csv Jackie Chan,1954,O+ ...
Say I have

#names.csv
Jackie Chan,1954,O+
Chuck Norris,1930,A-
Bruce Lee,1940,O+


Where the 1st column is the name, 2nd is DOB, and 3rd is blood type.

And I had a second file
...
2,885
Posted By chickeneaterguy
Thanks, this was a very concise and...
Thanks, this was a very concise and easy-to-understand explanation. I will try using this implementation after memorizing how it works.



Thanks to you as well. You've provided me with code...
2,885
Posted By chickeneaterguy
Thanks. Can both of you explain to me what...
Thanks.

Can both of you explain to me what these lines do? I know I can just try them out but I am new to unix and I don't know much.
2,885
Posted By chickeneaterguy
ethnicity or the third column of the 2nd file. I...
ethnicity or the third column of the 2nd file. I know in this situation I could just have them in the same file, but that's not the point. I am trying to learn.
2,885
Posted By chickeneaterguy
Comparing Strings in 2 .csv/txt files?
EDIT: My problems have been solved thanks to the help of bartus11 and pravin27

This code is just to help me learn. It serves no purpose other than that.

Here's a sample csv that I'm working...
2,821
Posted By chickeneaterguy
EDIT: problem is solved.
EDIT: problem is solved.
2,821
Posted By chickeneaterguy
I made Microsoft write this - LDAP queries are...
I made Microsoft write this - LDAP queries are executed more slowly than expected in the AD or LDS/ADAM directory service and Event ID 1644 may be logged (http://support.microsoft.com/kb/951581)
...
2,821
Posted By chickeneaterguy
Thanks again, you've helped me immensely.
Thanks again, you've helped me immensely.
2,821
Posted By chickeneaterguy
Okay, so for this example, the $1 will be the...
Okay, so for this example, the $1 will be the input file parameter, but the $2 and $3 inside of single quotes will be the 2nd and 3rd columns, respectively in the actual $1 file?



Okay, thanks....
2,821
Posted By chickeneaterguy
So if I just wrote the following script it would...
So if I just wrote the following script it would work, right?


#!/usr/bin/sh
awk -F, '{(if $2 == 1940) print $3}' > gender.txt

EDIT: Would that even output to the file(gender.txt)?
2,821
Posted By chickeneaterguy
Thanks, is there a way I could do it with...
Thanks, is there a way I could do it with writing:

awk -F, '{(if $2 == 1940) print $3}' > gender.txt

note: I'd be writing this into a file/script then running it as a parameter. Say the above...
2,821
Posted By chickeneaterguy
Extract a certain field from a CSV
EDIT: This problem has been solved thanks to the help of scottn.

Okay, so I have a CSV. Let's say it has the following entries in it:

Jackie Chan,1954,M
Chuck Norris,1930,M
Bruce Lee,1940,M
...
Showing results 1 to 14 of 14

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