Search Results

Search: Posts Made By: charles33
53,614
Posted By charles33
Works
Scrutinizer (https://www.unix.com/members/302052697.html)

Thanks very much. It was an error on my end - The one line had four tabs (actually it was just a bad data file to begin with); I fixed it...
53,614
Posted By charles33
Scrutinizer thanks for reply I tried the...
Scrutinizer thanks for reply

I tried the first code ( I thought for sure this one was going to work) but didn't:
awk -F'\t' '$1!=""' infileI tried the second code:
awk -F'\t' 'x$1' infilebut...
53,614
Posted By charles33
awk - remove row if specific field is empty/blank
I have this

text.filecharles darwin sam delight
george washington johnson culper
darwin sam delight
micheal jackson penny lite and would like to remove the...
2,329
Posted By charles33
Wow that was quick. But it didn't work. They all...
Wow that was quick. But it didn't work. They all came up with female.

Maybe the quotes are missing from the beginning of the lines:
...
2,329
Posted By charles33
Awk find in columns with "if then" statement and print results
I have a file1.txt

file1.txt
F-120009210","Felix","U-M-F-F-F-","white","yes","no","U-M-F-F-F-","Bristol","RI","true"
F-120009213","Fluffy","U-F-","white","yes","no","M-F-","Warwick","RI","true"...
44,150
Posted By charles33
OMG, This is like a live chat; fast reponse. Less...
OMG, This is like a live chat; fast reponse. Less than 5 minutes.

Wow, I was beating myself up. Your the best.

Works!

And thanks for the || operator, and how to apply it. I will use this...
44,150
Posted By charles33
Using awk, print all the lines where field 8 is equal to x
Using awk, print all the lines where field 8 is equal to x

I really did try, but this awk thing is really hard to figure out.

file1.txt"Georgia","Atlanta","2011-11-02","x","","","",""...
9,251
Posted By charles33
Thanks
Thanks.

I am learning. Thanks for rdcwayx and ahamed101 for being a great teacher!

By the way Ahamed, I am still testing the last code you gave me. It all works perfect! I will post as soon...
9,251
Posted By charles33
Thanks so much!! So for the second it would...
Thanks so much!!

So for the second it would be.
awk '/2011-11-03/ {$5=$4; $6=$4}1' FS=, OFS=, File1.txtIt works, just need to confirm this is the correct syntax with a semicolon?

; too run two...
9,251
Posted By charles33
Find in first column and replace the line with Awk, and output new file
Find in first column and replace the line with Awk, and output new file

File1.txt"2011-11-02","Georgia","Atlanta","x","",""
"2011-11-03","California","Los Angeles","x","",""...
20,439
Posted By charles33
Amazing
First off I want to thank you, ahamed101. Thanks!

Ok, I was skeptical at first. I tried the awk solution, on the sample above; it worked. Still skeptical, I tried it on a few large "test" data...
20,439
Posted By charles33
Compare two files and output difference, by first field using awk.
It seems like a common task, but I haven't been able to find the solution.

vitallog.txt
1310,John,Hancock
13211,Steven,Mills
122,Jane,Doe
138,Thoms,Doe
1500,Micheal,May
vitalinfo.txt...
Showing results 1 to 12 of 12

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