Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > General
User Name
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!


Closed Thread
  Search this Thread
Old 03-15-2004, 07:27 AM   #1
Registered: May 2003
Posts: 77

Rep: Reputation: 15
String manipulation with a script?


I'm a newbie in linux and I have a question about linux script and string manipulation.
In my case I have file with a dump of a mysql database.
ex: INSERT INTO test_table VALUES ('first','1','','','test');
I would like to change this line to add a new parameter.
For example, if I need to add the parameter 'A' in fourth position I will have to count the number of comma (3) and insert the letter 'A'.
My question is. Is it possible to do this with a simple script. If yes, what can I use as command to count a special charater and insert a small string after x special charaters?

Thanks in advance.
Old 03-15-2004, 12:07 PM   #2
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
Please do not double post.

Duplicate to:

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script: File Manipulation simon_qwl Programming 2 10-29-2005 03:40 PM
Filename string manipulation jango77 Linux - Newbie 2 03-27-2005 06:58 PM
how to manipulate string in script? ringerxyz Programming 2 02-17-2005 01:14 AM
bash + string manipulation dave bean Programming 7 02-16-2005 11:16 AM
String manipulation with a script. philipina Programming 4 03-16-2004 02:42 PM

All times are GMT -5. The time now is 01:58 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration