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 > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to print single quote in awk gauravgoel UNIX for Dummies Questions & Answers 6 08-20-2008 04:48 PM
escaping single quote javeed7 Shell Programming and Scripting 3 04-02-2008 05:36 AM
single quote dreams5617 Shell Programming and Scripting 2 12-01-2007 03:37 AM
single or double quote in SED asami Shell Programming and Scripting 2 07-17-2006 03:03 AM
AWK handling of single quote braindrain Shell Programming and Scripting 3 04-27-2006 04:57 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-23-2005
rjsha1 rjsha1 is offline
Registered User
  
 

Join Date: Dec 2005
Posts: 33
Replacing a single quote

Hi there
I have a data file like so below

'A/1';'T100002';'T100002';'';'01/05/2004';'31/05/2004';'01/06/2004';'08/06/2004';'1.36';'16';'0.22';'0';'0';'1.58';'0';'0';'0';'0';'0';'0';'clientes\resumen\200405\resumen_T10 0002_T100002_1.pdf';'';'0001';'S';'20040501';'';'02';'0';'S';'N'
'A/10';'T1720842';'T1720842';'';'01/06/2004';'30/06/2004';'01/07/2004';'08/07/2004';'15.67';'16';'2.51';'0';'0';'18.18';'0';'0';'0';'0';'0';'0';'clientes\resumen\200406\resumen_T 1720842_T1720842_10.pdf';'';'0001';'S';'20040601';'';'02';'0';'S';'N'


I am trying to SQL LOADER it and would like to replace the single quote ' I have tried sed and tr but they both use single quotes in the syntaz.

Has anyone got any ideas
  #2 (permalink)  
Old 12-23-2005
vgersh99's Avatar
vgersh99 vgersh99 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,116
Quote:
Originally Posted by rjsha1
Hi there
I have a data file like so below

'A/1';'T100002';'T100002';'';'01/05/2004';'31/05/2004';'01/06/2004';'08/06/2004';'1.36';'16';'0.22';'0';'0';'1.58';'0';'0';'0';'0';'0';'0';'clientes\resumen\200405\resumen_T10 0002_T100002_1.pdf';'';'0001';'S';'20040501';'';'02';'0';'S';'N'
'A/10';'T1720842';'T1720842';'';'01/06/2004';'30/06/2004';'01/07/2004';'08/07/2004';'15.67';'16';'2.51';'0';'0';'18.18';'0';'0';'0';'0';'0';'0';'clientes\resumen\200406\resumen_T 1720842_T1720842_10.pdf';'';'0001';'S';'20040601';'';'02';'0';'S';'N'


I am trying to SQL LOADER it and would like to replace the single quote ' I have tried sed and tr but they both use single quotes in the syntaz.

Has anyone got any ideas
Code:
echo "'A/1';'T100002';'T100002';'';'01/05/2004';'31/05/2004';'01/06/2004';'08/06/2004';'1.36';'16';'0.22';'0';'0'" | tr -d "'"
  #3 (permalink)  
Old 12-23-2005
ashterix ashterix is offline
Registered User
  
 

Join Date: Nov 2005
Location: cyberjaya
Posts: 85
$ sed -e s/\'//g datafile
  #4 (permalink)  
Old 12-23-2005
rjsha1 rjsha1 is offline
Registered User
  
 

Join Date: Dec 2005
Posts: 33
that works thans matey - merry xmas
Sponsored Links
Closed Thread

Bookmarks

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 01:26 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
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