![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here! |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
sed help
Hi ,
i am trying to make a change to my file . The code is sed -e 's/\(ts_rep[^ ]*\)/\1_S02/g' tempfile_tbsp_TS_REPL.ddl The output comes like this create tablespace TS_REPL_S02 in ALL_PARTITIONS pagesize 16384 MANAGED BY DATABASE USING (file '/dmpath/dmdiadm2/db2fs1p01/ts_repl'_S02 100 ) on dbpartitionnum 1 USING (file '/dmpath/dmdiadm2/db2fs1p02/ts_repl'_S02 100 ) on dbpartitionnum 2 But I want the output like this create tablespace TS_REPL_S02 in ALL_PARTITIONS pagesize 16384 MANAGED BY DATABASE USING (file '/dmpath/dmdiadm2/db2fs1p01/ts_repl_S02' 100 ) on dbpartitionnum 1 USING (file '/dmpath/dmdiadm2/db2fs1p02/ts_repl_S02' 100 ) on dbpartitionnum 2 I mean I want that single quote outside the string ! Thanks |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Code:
sed -e 's/\(ts_rep[^ ']*\)/\1_S02/g' tempfile_tbsp_TS_REPL.ddl |
|
#3
|
|||
|
|||
|
Era,
Its still not working . apsp8640:/tmp #sed 's/\(ts_rep[^ ']*\)/\1_S02/g' tempfile_tbsp_TS_REPL.ddl > Thanks, |
|
#4
|
|||
|
|||
|
even with -e
apsp8640:/tmp #sed -e 's/\(ts_rep[^ ']*\)/\1_S02/g' tempfile_tbsp_TS_REPL.ddl > It is expecting something else too .... Thanks |
|
#5
|
|||
|
|||
|
Ahh, of course not, sorry.
Code:
sed -e 's/\(ts_rep[^ '"'"']*\)/\1_S02/g' tempfile_tbsp_TS_REPL.ddl |
|
#6
|
|||
|
|||
|
You rock dude !!!
Cheers Daya |
|
#7
|
|||
|
|||
|
You rock dude !!!
Cheers Daya |
|||
| Google The UNIX and Linux Forums |