The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to read and compare multiple fields in a column at the same time ahjiefreak Shell Programming and Scripting 1 06-19-2008 11:08 AM
Replace 3 fields with null in the file vukkusila Shell Programming and Scripting 1 09-12-2007 01:10 AM
Combine a datafile with Master datafile, emergent! onthetopo Shell Programming and Scripting 6 05-12-2007 06:36 AM
search and replace different fields tungaw2004 UNIX for Dummies Questions & Answers 3 03-29-2007 03:16 AM
replace one section in a datafile Paprika Shell Programming and Scripting 4 06-17-2005 08:48 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 06-20-2008
MrCarter MrCarter is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 9
How do I read/find/replace fields in a csv datafile?

hello.

I'm somewhat a novice here so please be patient. My stumbling block when loading csvs into ORACLE tables is this:

I need to read a csv datafile, check several fields in each line, and if any of stated fields contain A ZERO only [instead of YYYYMONDD date field expected] then replace it with a null/blank character.

I had a go at:

cat <datafile> | awk ‘$5 == “0” { “ “ } END { print }';
cat <datafile> | awk ‘$8 == “0” { “ “ } END { print }'; ..etc..

..alas it didn't work..

all advice/comments very much appreciated

Steven.
 

Bookmarks

Tags
solaris

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:16 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0