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
can someone help me with modifying this file eamani_sun Shell Programming and Scripting 2 05-22-2008 01:15 PM
need help with understanding and modifying script dakkorn Shell Programming and Scripting 4 01-24-2008 09:01 AM
Modifying simple commands to create a script rocinante Shell Programming and Scripting 8 06-03-2007 09:35 PM
modifying my shell nico-hellas Shell Programming and Scripting 1 08-05-2005 09:43 AM
Modifying from borne shell to C shell zenkisoft UNIX for Dummies Questions & Answers 3 04-26-2001 04:18 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-21-2006
not4google not4google is offline
Registered User
  
 

Join Date: Oct 2006
Posts: 15
Modifying a csv file from Shell Script

Hi all,

I have some script that creates a temp csv file. What I need to do is do some search and replace and modify the file from my shell script. I know the commands to open the file and then apply the reg ex but wasnt sure how I could do this from a script and modify the file?

Any help would be much appreciated,

Thanks,

Last edited by not4google; 11-21-2006 at 05:42 AM.. Reason: More descriptive Title
  #2 (permalink)  
Old 11-21-2006
not4google not4google is offline
Registered User
  
 

Join Date: Oct 2006
Posts: 15
Its fine I am going to use sed e.g.

cat file1.csv | sed -e 's/replaceThisString/thisIsTheReplacementText/'
  #3 (permalink)  
Old 11-21-2006
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,944
Quote:
Originally Posted by not4google
Its fine I am going to use sed e.g.

cat file1.csv | sed -e 's/replaceThisString/thisIsTheReplacementText/'

this one,

Code:
sed -e 's/replaceThisString/thisIsTheReplacementText/' file1.csv
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 07:08 PM.


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