LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (http://www.linuxquestions.org/questions/general-10/)
-   -   String manipulation with a script? (http://www.linuxquestions.org/questions/general-10/string-manipulation-with-a-script-157904/)

philipina 03-15-2004 07:27 AM

String manipulation with a script?
 
Hello,


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.

crabboy 03-15-2004 12:07 PM

Please do not double post.

http://www.linuxquestions.org/rules.php


Duplicate to:
http://www.linuxquestions.org/questi...363#post817363


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