![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| Search, replace string in file1 with string from (lookup table) file2? | gstuart | Shell Programming and Scripting | 9 | 06-08-2009 06:11 AM |
| replace string in XML with sed | chiru_h | Shell Programming and Scripting | 6 | 04-09-2008 07:49 PM |
| replace string | sam99 | Shell Programming and Scripting | 4 | 03-04-2008 01:39 AM |
| replace a string | melanie_pfefer | Shell Programming and Scripting | 11 | 01-17-2008 10:57 AM |
| Replace string B depending on occurence of string A | hemangjani | Shell Programming and Scripting | 1 | 12-05-2006 05:10 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
I have to replace date in Control file every day i run the script
control file looks like this $cat pharma.ctl LOAD DATA INFILE '/usr/bin/sqlscripts/SQL.PharmID.20071206.txt' INTO TABLE uname.TEMP_TABLE FIELDS TERMINATED BY '|' TRAILING NULLCOLS (col_names) i tried $sed -e s/SQL.PharmID.[0-9]*.txt/SQL.PharmID.`date +%Y%m%d`.txt pharma.ctl>pharma.ctl Command Garbled can someone give me the right command |
|
||||
|
sed
Hi,
Code:
sed "s/SQL\.PharmID\.[0-9]*/SQL\.PharmID\.`date +%Y%m%d`/" filename |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|